Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Launch the WaferSlim SLIM server from a source directory
import sys
sys.path.append("/path/to/GIT/waferslim/src")
import waferslim.server
import logging
#sys.argv = ['programname', '-iq', '-q', directory]
def start_server():
''' Convenience method to start the server (used by __main__)'''
(options, args) = waferslim.server._get_options()
waferslim.server._setup_logging(options)
waferslim.server._setup_syspath(options)
waferslim.server._setup_encoding(options)
waferslim.server._setup_port(options, args)
# logging.getLogger('WaferSlimServer').info("About to start server")
waferslim.server.WaferSlimServer(options).serve_forever()
start_server()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment