@verbose
def twitterclass_demo():
 tw = Twitter()
 print('Track from the public stream\n')
 tw.tweets(keywords='love, hate', limit=10)
 print(SPACER)
 print('Search past Tweets\n')
 tw = Twitter()
 tw.tweets(keywords='love, hate', stream=False, limit=10)
 print(SPACER)
 print(('Follow two accounts in the public stream' + ' -- be prepared to wait a few minutes\n'))
 tw = Twitter()
 tw.tweets(follow=['759251', '6017542'], stream=True, limit=5)

@ verbose def twitterclass_demo ( ) : tw = Twitter ( ) print ( 'Track from the public stream\n' ) tw . tweets ( keywords = 'love, hate' , limit = 10 ) print ( SPACER ) print ( 'Search past Tweets\n' ) tw = Twitter ( ) tw . tweets ( keywords = 'love, hate' , stream = False , limit = 10 ) print ( SPACER ) print ( ( 'Follow two accounts in the public stream' + ' -- be prepared to wait a few minutes\n' ) ) tw = Twitter ( ) tw . tweets ( follow = [ '759251' , '6017542' ] , stream = True , limit = 5 )
use the simplified :class:twitter class to write some tweets to a file .