Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions drive/driveapp/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

from __future__ import print_function
import pprint
import six
import httplib2
from googleapiclient.discovery import build
import googleapiclient.http
Expand All @@ -32,8 +33,8 @@
flow.redirect_uri = oauth2client.client.OOB_CALLBACK_URN
authorize_url = flow.step1_get_authorize_url()
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"
code = input('Enter verification code: ').strip()
# `six` library supports Python2 and Python3 without redefining builtin input()
code = six.moves.input('Enter verification code: ').strip()
credentials = flow.step2_exchange(code)

# Create an authorized Drive API client.
Expand Down