예제 #1
0
def runner(to_lex=None, out=sys.stdout, only_lex=True):
    sys.argv = [sys.argv[0]]
    if to_lex is not None:
        sys.argv.append("--path")
        sys.argv.append(os.path.abspath(to_lex))
    if only_lex:
        sys.argv.append("--lex")
    parent_conn, child_conn = Pipe()
    interface_handler = InterfaceHandler(out=out, conn=child_conn)
    interface_handler.start()
    setup_test_data(interface_handler, parent_conn)
    return interface_handler
예제 #2
0
def main():
    try:
        interface_handler = InterfaceHandler()
        interface_handler.start()
    except KeyboardInterrupt:
        pass