Skip to content

Commit ee20855

Browse files
gschizasjtroussard
andauthored
Update documentation for Python 3 (#435)
* Update documentation for Python 3 Given that Python 2 is out of support, the documenation examples should probably use Python 3 syntax (i.e. print as a function, input instead of raw_input) instead of Python 2 syntax. * whitespace change Co-authored-by: jtroussard <jacques.troussard@gmail.com>
1 parent 9c1f83f commit ee20855

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/examples/outlook.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@ a callback URL then you can try out the command line interactive example below.
2424
2525
>>> # Redirect the user owner to the OAuth provider (i.e. Outlook) using an URL with a few key OAuth parameters.
2626
>>> authorization_url, state = outlook.authorization_url(authorization_base_url)
27-
>>> print 'Please go here and authorize,', authorization_url
27+
>>> print('Please go here and authorize,', authorization_url)
2828
2929
>>> # Get the authorization verifier code from the callback url
30-
>>> redirect_response = raw_input('Paste the full redirect URL here:')
30+
>>> redirect_response = input('Paste the full redirect URL here:')
3131
3232
>>> # Fetch the access token
33-
>>> token = outlook.fetch_token(token_url,client_secret=client_secret,authorization_response=redirect_response)
33+
>>> token = outlook.fetch_token(token_url, client_secret=client_secret, authorization_response=redirect_response)
3434
3535
>>> # Fetch a protected resource, i.e. calendar information
3636
>>> o = outlook.get('https://outlook.office.com/api/v1.0/me/calendars')
37-
>>> print o.content
37+
>>> print(o.content)

0 commit comments

Comments
 (0)