From: Floyd Hightower Date: Tue, 17 Oct 2017 14:48:23 +0000 (-0400) Subject: Updating print statements for python3 X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=91887af844b9256fd27cf0264f5533e99dd4a344;p=tweepy.git Updating print statements for python3 --- diff --git a/docs/auth_tutorial.rst b/docs/auth_tutorial.rst index 72cd0a3..7c5becb 100644 --- a/docs/auth_tutorial.rst +++ b/docs/auth_tutorial.rst @@ -54,7 +54,7 @@ So let's fetch our request token to begin the dance:: try: redirect_url = auth.get_authorization_url() except tweepy.TweepError: - print 'Error! Failed to get request token.' + print('Error! Failed to get request token.') This call requests the token from twitter and returns to us the authorization URL where the user must be redirect to authorize us. Now @@ -99,7 +99,7 @@ treasure box. To fetch this token we do the following:: try: auth.get_access_token(verifier) except tweepy.TweepError: - print 'Error! Failed to get access token.' + print('Error! Failed to get access token.') It is a good idea to save the access token for later use. You do not need to re-fetch it each time. Twitter currently does not expire the diff --git a/docs/code_snippet.rst b/docs/code_snippet.rst index aed7d7c..7b4f7bc 100644 --- a/docs/code_snippet.rst +++ b/docs/code_snippet.rst @@ -76,4 +76,4 @@ will wait for 15 minutes each time it hits the rate limit. for follower in limit_handled(tweepy.Cursor(api.followers).items()): if follower.friends_count < 300: - print follower.screen_name + print(follower.screen_name)