Ejemplo n.º 1
0
def main():

    # Get the default mayavi plugins.
    plugins = get_plugins()
    # Inject our plugin up front so our perspective becomes the default.
    plugins.insert(0, ExplorerPlugin())

    # Create an Envisage application.
    id = 'explorer3d.Explorer3D'
    application = WorkbenchApplication(id=id, plugins=plugins)
    # This needs to be done here since the ETSConfig.application_home is
    # not set correctly up to this point.
    setup_logger(logger, 'explorer3d.log', mode=logging.ERROR)

    # Start the application.
    application.run()
Ejemplo n.º 2
0
def main():
    from enthought.envisage.core_plugin import CorePlugin
    from enthought.envisage.ui.workbench.workbench_plugin import WorkbenchPlugin
    from enthought.logger.plugin.logger_plugin import LoggerPlugin
    from enthought.plugins.python_shell.python_shell_plugin import PythonShellPlugin
    plugins = [
        CorePlugin(),
        WorkbenchPlugin(),
        LoggerPlugin(),
        PythonShellPlugin(),
        LoggerDemoPlugin(),
    ]
    app = WorkbenchApplication(
        id='enthought.logger.demo',
        name='Logger Demo',
        plugins=plugins,
    )
    app.run()
Ejemplo n.º 3
0
def main():
    """The main application is created and launched here."""
    # Setup the logger.

    plugins = [
        CorePlugin(),
        WorkbenchPlugin(),
        MyPlugin(),
        ScenePlugin(),
        SceneUIPlugin(),
        BrowserPlugin(),
        PythonShellPlugin(),
    ]
    # Create an Envisage application.
    id = 'enthought.tvtk.examples.plugins.test'
    application = WorkbenchApplication(id=id, plugins=plugins)
    # This needs to be done here since the ETSConfig.application_home is
    # not set correctly up to this point.
    setup_logger(logger, 'test.log', mode=logging.DEBUG)

    application.gui.on_trait_change(
        lambda value: bind_object(value, application), 'started')
    # Start the application.
    application.run()