Skip to content Skip to sidebar Skip to footer

How To Run Python Script With The Same Port

Right now I am setting up oauth2 from Gmail to send mail from my python script. I am using a quick start code from Google to verify the authorize code but I am facing a situation w

Solution 1:

For example, how about the following modification?

From:

creds = flow.run_local_server(port=0)

To:

creds = flow.run_local_server()
  • In this case, the port 8080 is used every time.

or

creds = flow.run_local_server(port=8000)
  • In this case, the port 8000 is used every time.

Reference:


Post a Comment for "How To Run Python Script With The Same Port"