Skip to content

Commit 762dcd6

Browse files
authored
Update main.py
Update to use `builtins` instead of `six`, but might require `pip install future`
1 parent fb4f522 commit 762dcd6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drive/driveapp/main.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
"""
77

88
from __future__ import print_function
9-
import six
109
import pprint
1110
import httplib2
1211
from googleapiclient.discovery import build
1312
import googleapiclient.http
1413
import oauth2client.client
14+
from builtins import input
1515

1616
# OAuth 2.0 scope that will be authorized.
1717
# Check https://developers.google.com/drive/scopes for all available scopes.
@@ -33,8 +33,8 @@
3333
flow.redirect_uri = oauth2client.client.OOB_CALLBACK_URN
3434
authorize_url = flow.step1_get_authorize_url()
3535
print('Go to the following link in your browser: ' + authorize_url)
36-
# Add user input support for both Python2 and Python3
37-
code = six.moves.input('Enter verification code: ').strip()
36+
# Should support both Python2 and Python3 with 'from builtins import input'
37+
code = input('Enter verification code: ').strip()
3838
credentials = flow.step2_exchange(code)
3939

4040
# Create an authorized Drive API client.

0 commit comments

Comments
 (0)