

@on_trait_change('application.gui:started')
def _on_application_gui_started(self, obj, trait_name, old, new):
    'This is called as soon as  the Envisage GUI starts up.  The\n        method is responsible for setting our script instance.\n        '
    if ((trait_name != 'started') or (not new)):
        return
    app = self.application
    from mayavi.plugins.script import Script
    window = app.workbench.active_window
    self.script = obj.get_service(Script)
    app.gui.invoke_later(self.run)

dataset/ETHPy150Open enthought/mayavi/mayavi/plugins/app.py Mayavi._on_application_gui_started/VarMisuse@72/145 `window`->`obj`