def main(): # Get the default mayavi plugins. plugins = get_plugins() from rtrace_plugin import RTracePlugin from rtrace_service import RTraceService # Inject our plugin up front so our perspective becomes the default. #plugins = [ RTracePlugin() ] plugins.insert(0, RTracePlugin()) from ibvpy_workbench_application import IBVPyWorkbenchApplication # Create an Envisage application. id = 'rtrace_service.rtrace_service' application = IBVPyWorkbenchApplication(id=id, plugins = plugins ) rtrace_mgr = RTraceService( rtrace_list = [ RTraceGraph( name = 'rte 1' ), RTraceGraph( name = 'rte 2' ), RTraceGraph( name = 'rte 3' ), RTraceGraph( name = 'rte 4' ), RTraceGraph( name = 'rte 5' ), RTraceGraph( name = 'rte 6' ), RTraceGraph( name = 'rte 7' ), RTraceGraph( name = 'rte 8' ), RTraceGraph( name = 'rte 8' ), RTraceGraph( name = 'rte 10' ), RTraceGraph( name = 'rte 11' ), ] ) application.register_service( 'rtrace_service.RTraceService', rtrace_mgr) setup_logger(logger, 'rtrace.log', mode=logging.ERROR) # Start the application. application.run()
def main(self, argv=None, plugins=None): """The main application is created and launched here. Parameters ---------- - argv : `list` of `strings` The list of command line arguments. The default is `None` where no command line arguments are parsed. To support command line arguments you can pass `sys.argv[1:]`. - plugins : `list` of `Plugin`s List of plugins to start. If none is provided it defaults to something meaningful. - log_mode : The logging mode to use. """ # Parse any cmd line args. if argv is None: argv = [] self.parse_command_line(argv) if plugins is None: plugins = get_plugins() plugins += get_custom_plugins() # Create the application prefs = preference_manager.preferences app = IBVPyWorkbenchApplication(plugins=plugins, preferences=prefs) self.application = app # Setup the logger. #self.setup_logger() # Start the application. app.run()
def main(self, argv=None, plugins=None): """The main application is created and launched here. Parameters ---------- - argv : `list` of `strings` The list of command line arguments. The default is `None` where no command line arguments are parsed. To support command line arguments you can pass `sys.argv[1:]`. - plugins : `list` of `Plugin`s List of plugins to start. If none is provided it defaults to something meaningful. - log_mode : The logging mode to use. """ # Parse any cmd line args. if argv is None: argv = [] self.parse_command_line(argv) if plugins is None: plugins = get_plugins() plugins += get_custom_plugins() # Create the application prefs = preference_manager.preferences app = IBVPyWorkbenchApplication(plugins=plugins, preferences=prefs) self.application = app # Setup the logger. # self.setup_logger() # Start the application. app.run()
def main(): # Get the default mayavi plugins. plugins = get_plugins() from rtrace_plugin import RTracePlugin from rtrace_service import RTraceService # Inject our plugin up front so our perspective becomes the default. #plugins = [ RTracePlugin() ] plugins.insert(0, RTracePlugin()) from ibvpy_workbench_application import IBVPyWorkbenchApplication # Create an Envisage application. id = 'rtrace_service.rtrace_service' application = IBVPyWorkbenchApplication(id=id, plugins=plugins) rtrace_mgr = RTraceService(rtrace_list=[ RTraceGraph(name='rte 1'), RTraceGraph(name='rte 2'), RTraceGraph(name='rte 3'), RTraceGraph(name='rte 4'), RTraceGraph(name='rte 5'), RTraceGraph(name='rte 6'), RTraceGraph(name='rte 7'), RTraceGraph(name='rte 8'), RTraceGraph(name='rte 8'), RTraceGraph(name='rte 10'), RTraceGraph(name='rte 11'), ]) application.register_service('rtrace_service.RTraceService', rtrace_mgr) setup_logger(logger, 'rtrace.log', mode=logging.ERROR) # Start the application. application.run()