예제 #1
0
def register_module(module):
  """
  Register a subset of functions to be remotely accessible via ernie.
  
  This function assumes the given module has a list named 'ernie_func_list'.
  The functions in that list are registered with ernie, under an external
  module with the same name as the internal module.
  """

  for func in module.ernie_func_list:
    Ernie.mod(module.__name__).register(func)
예제 #2
0
def mod(name):
    return Ernie.mod(name)
예제 #3
0
def start(host='', port=9999, threading=True):
    Ernie.log("Starting")
    server = ThreadingTCPServer if threading else TCPServer
    server((host, port), Ernie).serve_forever()
예제 #4
0
def start(host='localhost', port=9999):
    Ernie.log("Starting")
    SocketServer.TCPServer((host, port), Ernie).serve_forever()
예제 #5
0
def mod(name):
    return Ernie.mod(name)
예제 #6
0
def start():
    server = Ernie()
    server.start()