<s> from __future__ import print_function <EOL> from os import environ <EOL> from twisted . internet . defer import inlineCallbacks <EOL> from autobahn . twisted . util import sleep <EOL> from autobahn . twisted . wamp import ApplicationSession , ApplicationRunner <EOL> class Component ( ApplicationSession ) : <EOL> """<STR_LIT>""" <EOL> @ inlineCallbacks <EOL> def onJoin ( self , details ) : <EOL> print ( "<STR_LIT>" ) <EOL> counter = <NUM_LIT:0> <EOL> while True : <EOL> print ( "<STR_LIT>" , counter ) <EOL> self . publish ( u'<STR_LIT>' , counter ) <EOL> counter += <NUM_LIT:1> <EOL> yield sleep ( <NUM_LIT:1> ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> runner = ApplicationRunner ( <EOL> environ . get ( "<STR_LIT>" , u"<STR_LIT>" ) , <EOL> u"<STR_LIT>" , <EOL> ) <EOL> runner . run ( Component ) </s>
