def remote_main(parent_workflow_conn, parent_mpl_conn, log_q, running_event): # this should only ever be main method after a spawn() call # (not fork). So we should have a fresh logger to set up. # messages that end up at the root logger to go log_q from logging.handlers import QueueHandler h = QueueHandler(log_q) logging.getLogger().addHandler(h) # We want matplotlib to use our backend .... in both the GUI and the # remote process. Must be called BEFORE cytoflow is imported import matplotlib matplotlib.use('module://cytoflowgui.matplotlib_backend_remote') from traits.api import push_exception_handler from cytoflowgui.workflow import RemoteWorkflow # install a global (gui) error handler for traits notifications push_exception_handler(handler=log_notification_handler, reraise_exceptions=False, main=True) sys.excepthook = log_excepthook # take care of the 3 places in the cytoflow module that # need different behavior in a GUI import cytoflow cytoflow.RUNNING_IN_GUI = True running_event.set() RemoteWorkflow().run(parent_workflow_conn, parent_mpl_conn)
def remote_main(parent_workflow_conn, parent_mpl_conn, log_q): from cytoflowgui.workflow import RemoteWorkflow # install a global (gui) error handler for traits notifications push_exception_handler(handler=log_notification_handler, reraise_exceptions=debug, main=True) sys.excepthook = log_excepthook RemoteWorkflow().run(parent_workflow_conn, parent_mpl_conn, log_q)
def remote_main(parent_workflow_conn, log_q, running_event): # this should only ever be main method after a spawn() call # (not fork). So we should have a fresh logger to set up. # messages that end up at the root logger go to log_q h = QueueHandler(log_q) logging.getLogger().addHandler(h) # make sure that ALL messages get queued in the remote # process -- we'll filter/handle then in the local # process logging.getLogger().setLevel(logging.DEBUG) running_event.set() RemoteWorkflow().run(parent_workflow_conn)
def remote_main(parent_workflow_conn, parent_mpl_conn, log_q, running_event): # We want matplotlib to use our backend .... in both the GUI and the # remote process. Must be called BEFORE cytoflow is imported import matplotlib matplotlib.use('module://cytoflowgui.matplotlib_backend') from traits.api import push_exception_handler from cytoflowgui.workflow import RemoteWorkflow # install a global (gui) error handler for traits notifications push_exception_handler(handler=log_notification_handler, reraise_exceptions=False, main=True) sys.excepthook = log_excepthook running_event.set() RemoteWorkflow().run(parent_workflow_conn, parent_mpl_conn, log_q)
def remote_main(parent_workflow_conn, parent_mpl_conn, log_q, running_event): # We want matplotlib to use our backend .... in both the GUI and the # remote process. Must be called BEFORE cytoflow is imported import matplotlib matplotlib.use('module://cytoflowgui.matplotlib_backend_remote') from traits.api import push_exception_handler from cytoflowgui.workflow import RemoteWorkflow # install a global (gui) error handler for traits notifications push_exception_handler(handler = log_notification_handler, reraise_exceptions = False, main = True) sys.excepthook = log_excepthook # take care of the 3 places in the cytoflow module that # need different behavior in a GUI import cytoflow cytoflow.RUNNING_IN_GUI = True running_event.set() RemoteWorkflow().run(parent_workflow_conn, parent_mpl_conn, log_q)
def remote_main(parent_workflow_conn, parent_mpl_conn, log_q, running_event): running_event.set() RemoteWorkflow().run(parent_workflow_conn, parent_mpl_conn, log_q)