console.py 353 B

12345678910
  1. import sys
  2. def get_code(authorize_url):
  3. """Show authorization URL and return the code the user wrote."""
  4. message = "Check this link in your browser: {0}".format(authorize_url)
  5. sys.stderr.write(message + "\n")
  6. try: input = raw_input #For Python2 compatability
  7. except NameError: pass
  8. return input("Enter verification code: ")