Exemplo n.º 1
0
            # is ready
            #
            runtime.ui_server_websocket = proxy(ws)
            cmtype = "success"
            msg = {'msg_type': 'EXP_SESSION_STARTED', 'type': cmtype}
            runtime.sendToWebServer(msg)

            app_conf = None

            # Start the exp runtime
            #
            cmd, _ = runtime.start(app_config_file_name,pjoin(configurationDirectory,
                                                        new_iohubconfig_rpath))
            # Experiment Session complete, close it out.
            #
            runtime.close()
            runtime = None
        elif cmd == "CLOSE_EXP_SESSION":            
            if runtime:
                runtime.close()
                runtime._close()
                runtime = None
            cmd = None
        elif cmd == "EXIT_PROGRAM":
            if runtime:
                runtime.close()
                runtime._close()
                runtime = None
                core.quit()
            return None
        time.sleep(0.1)