예제 #1
0
파일: run.py 프로젝트: ritika-giri/cytoflow
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)
예제 #2
0
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)
예제 #3
0
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)
예제 #4
0
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)
예제 #5
0
파일: run.py 프로젝트: netphone/cytoflow
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)
예제 #6
0
 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)