<s> """<STR_LIT>""" <EOL> from __future__ import print_function <EOL> import sys <EOL> from os import getpid <EOL> from circuits import Component , Event <EOL> from circuits . node import Node , remote <EOL> class hello ( Event ) : <EOL> """<STR_LIT>""" <EOL> class App ( Component ) : <EOL> def ready ( self , client ) : <EOL> print ( "<STR_LIT>" ) <EOL> def connected ( self , host , port ) : <EOL> print ( "<STR_LIT>" . format ( host , port ) ) <EOL> print ( "<STR_LIT>" ) <EOL> def hello ( self ) : <EOL> print ( "<STR_LIT>" ) <EOL> return "<STR_LIT>" . format ( getpid ( ) ) <EOL> app = App ( ) <EOL> node = Node ( ) . register ( app ) <EOL> host = sys . argv [ <NUM_LIT:1> ] <EOL> port = int ( sys . argv [ <NUM_LIT:2> ] ) <EOL> bind = ( host , port ) <EOL> node . add ( "<STR_LIT:test>" , * bind ) <EOL> app . start ( ) </s>
