Exemplo n.º 1
0
def main():
    load_plugins()
    if len(sys.argv) == 1 or sys.argv[1] == '-admin':
        if try_gui_imports():
            admin_mode = len(sys.argv) > 1 and sys.argv[1] == '-admin'
            main_gui(admin_mode)
        else:
            print 'Cannot open the gui mode, please see the Warning above'
    elif sys.argv[1] == '-web':
        port = 5001
        if ('-port' in sys.argv):
            port = int(sys.argv[sys.argv.index('-port') + 1])
        if '-debug' in sys.argv:
            import hal_configurator.web.app as app
            app.main(port)
        else:
            import hal_configurator.web.web_server as web_server
            web_server.run_server(port)
    else:
        console.main()
Exemplo n.º 2
0
def main():
    load_plugins()
    if len(sys.argv) == 1 or sys.argv[1] == '-admin':
        if try_gui_imports():
            admin_mode = len(sys.argv) > 1 and sys.argv[1] == '-admin'
            main_gui(admin_mode)
        else:
            print 'Cannot open the gui mode, please see the Warning above'
    elif sys.argv[1] == '-web':
        port = 5001 
        if('-port' in sys.argv):
            port = int(sys.argv[sys.argv.index('-port')+1])
        if '-debug' in sys.argv:
            import hal_configurator.web.app as app
            app.main(port)
        else:
            import hal_configurator.web.web_server as web_server
            web_server.run_server(port)
    else:
        console.main()
Exemplo n.º 3
0
def execute_job(builder, workspace_path, execution_dir):
	Workspace.set(workspace_path)
	load_plugins()
	builder.set_execution_dir(execution_dir)
	builder.apply()
Exemplo n.º 4
0
def execute_job(builder, workspace_path, execution_dir):
    Workspace.set(workspace_path)
    load_plugins()
    builder.set_execution_dir(execution_dir)
    builder.apply()