We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 0a5296c + d37d8bb commit b245f84Copy full SHA for b245f84
drive/driveapp/main.py
@@ -7,6 +7,7 @@
7
8
from __future__ import print_function
9
import pprint
10
+import six
11
import httplib2
12
from googleapiclient.discovery import build
13
import googleapiclient.http
@@ -32,8 +33,8 @@
32
33
flow.redirect_uri = oauth2client.client.OOB_CALLBACK_URN
34
authorize_url = flow.step1_get_authorize_url()
35
print('Go to the following link in your browser: ' + authorize_url)
-# If you can't use Python 3.x, please change "input" to "raw_input"
36
-code = input('Enter verification code: ').strip()
+# `six` library supports Python2 and Python3 without redefining builtin input()
37
+code = six.moves.input('Enter verification code: ').strip()
38
credentials = flow.step2_exchange(code)
39
40
# Create an authorized Drive API client.
0 commit comments