<s> '''<STR_LIT>''' <EOL> from __future__ import ( division , absolute_import , print_function , <EOL> unicode_literals ) <EOL> import jsonrpclib as rpclib <EOL> from . import SimIndex <EOL> class RemoteSimIndex ( object ) : <EOL> '''<STR_LIT>''' <EOL> def __init__ ( self , server_url ) : <EOL> '''<STR_LIT>''' <EOL> from . . import sim_server <EOL> self . PREFIX = sim_server . SimIndexService . PREFIX <EOL> self . EXPORTED_METHODS = sim_server . SimIndexService . EXPORTED_METHODS <EOL> self . _server = rpclib . Server ( server_url ) <EOL> def __getattr__ ( self , name ) : <EOL> if name in self . EXPORTED_METHODS : <EOL> func = getattr ( self . _server , <EOL> self . PREFIX + '<STR_LIT:.>' + name ) <EOL> return func <EOL> else : <EOL> raise Exception ( "<STR_LIT>" . format ( name ) ) <EOL> SimIndex . register ( RemoteSimIndex ) </s>
