Esempio n. 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)
Esempio n. 2
0
def mod(name):
    return Ernie.mod(name)
Esempio n. 3
0
def start(host='', port=9999, threading=True):
    Ernie.log("Starting")
    server = ThreadingTCPServer if threading else TCPServer
    server((host, port), Ernie).serve_forever()
Esempio n. 4
0
def start(host='localhost', port=9999):
    Ernie.log("Starting")
    SocketServer.TCPServer((host, port), Ernie).serve_forever()
Esempio n. 5
0
def mod(name):
    return Ernie.mod(name)
Esempio n. 6
0
def start():
    server = Ernie()
    server.start()