<s> import os <EOL> import sys <EOL> sys . path . insert ( <NUM_LIT:0> , os . path . abspath ( '<STR_LIT:..>' ) ) <EOL> from twisted . internet import reactor <EOL> from twisted . internet import defer <EOL> from fastjsonrpc . client import Proxy <EOL> def printValue ( value ) : <EOL> print "<STR_LIT>" % str ( value ) <EOL> def printError ( error ) : <EOL> print '<STR_LIT:error>' , error . value <EOL> def shutDown ( data ) : <EOL> print "<STR_LIT>" <EOL> reactor . stop ( ) <EOL> address = '<STR_LIT>' <EOL> proxy = Proxy ( address ) <EOL> ds = [ ] <EOL> d = proxy . callRemote ( '<STR_LIT>' , [ '<STR_LIT>' , '<STR_LIT>' ] ) <EOL> d . addCallbacks ( printValue , printError ) <EOL> ds . append ( d ) <EOL> d = proxy . callRemote ( '<STR_LIT>' , <NUM_LIT> , <NUM_LIT:15> ) <EOL> d . addCallbacks ( printValue , printError ) <EOL> ds . append ( d ) <EOL> d = proxy . callRemote ( '<STR_LIT>' ) <EOL> d . addCallbacks ( printValue , printError ) <EOL> ds . append ( d ) <EOL> d = proxy . callRemote ( '<STR_LIT:none>' ) <EOL> d . addCallbacks ( printValue , printError ) <EOL> ds . append ( d ) <EOL> ds = defer . DeferredList ( ds ) <EOL> ds . addCallback ( shutDown ) <EOL> reactor . run ( ) </s>
