+from __future__ import absolute_import, print_function
+
import tweepy
# == OAuth Authentication ==
consumer_secret=""
# The access tokens can be found on your applications's Details
-# page located at https://dev.twitter.com/apps (located
+# page located at https://dev.twitter.com/apps (located
# under "Your access token")
access_token=""
access_token_secret=""
# If the authentication was successful, you should
# see the name of the account print out
-print api.me().name
+print(api.me().name)
# If the application settings are set for "Read and Write" then
-# this line should tweet out the message to your account's
+# this line should tweet out the message to your account's
# timeline. The "Read and Write" setting is on https://dev.twitter.com/apps
api.update_status('Updating using OAuth authentication via Tweepy!')
+from __future__ import absolute_import, print_function
+
from tweepy.streaming import StreamListener
from tweepy import OAuthHandler
from tweepy import Stream
"""
def on_data(self, data):
- print data
+ print(data)
return True
def on_error(self, status):
- print status
+ print(status)
if __name__ == '__main__':
l = StdOutListener()