I am using the python V2.75 and have installed all the twitter related packages for python using the command 'pip install twitter'. I have played around it and the api works fine. Now, I want to access the streaming api of the twitter for real time tweets. I have written the code as shown below
import twitter
twitter_stream = twitter.TwitterStream(auth=UserPassAuth('username', 'password'))
res = twitter_stream.statuses.filter(track='obama')
When i try to run the above code it throws an error "NameError: name 'UserPassAuth' is not defined". I could figure out that some packages have not been imported/missing. Could u please suggest some ways to get it working.