<s> import sys <EOL> sys . path . insert ( <NUM_LIT:0> , "<STR_LIT>" ) <EOL> import threading <EOL> import time <EOL> import logging <EOL> import snakemq <EOL> import snakemq . link <EOL> import snakemq . packeter <EOL> import snakemq . messaging <EOL> import snakemq . queues <EOL> import snakemq . rpc <EOL> class B ( object ) : <EOL> def wer ( self ) : <EOL> print ( "<STR_LIT>" ) <EOL> def f ( ) : <EOL> time . sleep ( <NUM_LIT:1> ) <EOL> c = None <EOL> while True : <EOL> if list ( m . _conn_by_ident . keys ( ) ) : <EOL> c = <NUM_LIT:1> <EOL> if c : <EOL> try : <EOL> print ( proxy . get_fo ( ) ) <EOL> except Exception as exc : <EOL> print ( "<STR_LIT>" , str ( exc . __remote_traceback__ ) ) <EOL> s . stop ( ) <EOL> time . sleep ( <NUM_LIT:2> ) <EOL> snakemq . init_logging ( ) <EOL> logger = logging . getLogger ( "<STR_LIT>" ) <EOL> logger . setLevel ( logging . DEBUG ) <EOL> s = snakemq . link . Link ( ) <EOL> s . add_connector ( ( "<STR_LIT:localhost>" , <NUM_LIT> ) ) <EOL> tr = snakemq . packeter . Packeter ( s ) <EOL> m = snakemq . messaging . Messaging ( "<STR_LIT>" , "<STR_LIT>" , tr , None ) <EOL> t = threading . Thread ( target = f ) <EOL> t . setDaemon ( <NUM_LIT:1> ) <EOL> t . start ( ) <EOL> rh = snakemq . messaging . ReceiveHook ( m ) <EOL> crpc = snakemq . rpc . RpcClient ( rh ) <EOL> srpc = snakemq . rpc . RpcServer ( rh ) <EOL> srpc . register_object ( B ( ) , "<STR_LIT:b>" ) <EOL> proxy = crpc . get_proxy ( "<STR_LIT>" , "<STR_LIT:abc>" ) <EOL> proxy . mysignal . as_signal ( <NUM_LIT:10> ) <EOL> proxy . mysignal ( ) <EOL> s . loop ( ) </s>
