<s> import time <EOL> from MeteorClient import MeteorClient <EOL> client = MeteorClient ( '<STR_LIT>' ) <EOL> def subscribed ( subscription ) : <EOL> print ( '<STR_LIT>' . format ( subscription ) ) <EOL> def unsubscribed ( subscription ) : <EOL> print ( '<STR_LIT>' . format ( subscription ) ) <EOL> def added ( collection , id , fields ) : <EOL> print ( '<STR_LIT>' . format ( collection , id ) ) <EOL> for key , value in fields . items ( ) : <EOL> print ( '<STR_LIT>' . format ( key , value ) ) <EOL> all_lists = client . find ( '<STR_LIT>' , selector = { } ) <EOL> print ( '<STR_LIT>' . format ( all_lists ) ) <EOL> print ( '<STR_LIT>' . format ( len ( all_lists ) ) ) <EOL> def connected ( ) : <EOL> print ( '<STR_LIT>' ) <EOL> def subscription_callback ( error ) : <EOL> if error : <EOL> print ( error ) <EOL> client . on ( '<STR_LIT>' , subscribed ) <EOL> client . on ( '<STR_LIT>' , unsubscribed ) <EOL> client . on ( '<STR_LIT>' , added ) <EOL> client . on ( '<STR_LIT>' , connected ) <EOL> client . connect ( ) <EOL> client . subscribe ( '<STR_LIT>' ) <EOL> while True : <EOL> try : <EOL> time . sleep ( <NUM_LIT:1> ) <EOL> except KeyboardInterrupt : <EOL> break <EOL> client . unsubscribe ( '<STR_LIT>' ) </s>
