I used import twitter and then tried authenticating using the following command - Twitter(auth=OAuth(access_token, access_token_secret, consumer_key, secret_key))
On running the program I get the error: name Twitter not defined. When I use from twitter import *, it works. Why is it so?
I am asking this because if i use tweepy instead, a simple import tweepyworks. Also, doesn't import twitter work the same as from twitter import *?
twitter.Twitter(...). As you noted, usingfrom module import *does make the items inside the module directly visible.