<s> import sys <EOL> import zmq <EOL> context = zmq . Context ( ) <EOL> socket = context . socket ( zmq . SUB ) <EOL> print "<STR_LIT>" <EOL> socket . connect ( "<STR_LIT>" ) <EOL> scrip_filter = sys . argv [ <NUM_LIT:1> : ] if len ( sys . argv ) > <NUM_LIT:1> else [ "<STR_LIT>" ] <EOL> for scrip in scrip_filter : <EOL> socket . setsockopt ( zmq . SUBSCRIBE , scrip ) <EOL> while True : <EOL> string = socket . recv ( ) <EOL> stock , price = string . split ( ) <EOL> print "<STR_LIT>" % ( stock , price ) </s>
