Subpackages
- action
- additions
- compat
- core
- internal
- project
- repository
- resource
- scripting
- single_project
- ui
- workbench
Submodules
- api - Envisage package Copyright 2003, 2004, 2005 Enthought, Inc.
- setup
- setup_envisage
- traits - Reusable trait definitions that are related to Envisage.
- util
- version
Variables
- application
The global singleton application instance (initialized via '''_set_application()''' from within the ''''Application()''' constructor).
The goal here is to allow the user to import the singleton application instance using from enthought.envisage import application. However, we still want to keep the definition of the '''Application''' class separate, and since we don't control when the application is instantiated, I can't think of a better way at the moment! Smells tho' don't it?!?
It smells because other modules will not see changes to '''application'''; they get a copy of application (the object reference if not None) as it is at the time that they import '''application'''. Thus, this only works if '''application''' is never reassigned and as long as it has already been assigned.
Thus, '''application''' is intended to be used by user scripts that are run in the context of an application. Module writers should use '''get_application()'''.
Actually, we should eliminate use of the singleton everywhere apart from user scripts. Hence, if you see a current use of '''get_application()''' then we need to figure out how to remove it!
application = None
- using_workbench
FIXME: This singleton is used to modify the imports or behavior of other code while we are in the middle of switching from the UI plug-in to the workbench plug-in. This is necessary to keep things working with the old UI while we port and test things with the new workbench plug-in. Once that happens, we should delete this global and anything using it!
To use the workbench plug-in (vs. the UI plug-in) call the setter method and pass a value of '''True'''
using_workbench = False
Function summary
- get_active_window()
- get_application()
- get_using_workbench()
- join(*args)
Functions
- get_active_window()
Returns the active window.
This checks the '''using_workbench''' flag and gets the active window from either the UI plug-in or the Workbench plug-in, as appropriate.
- get_application()
Returns the singleton application.
- get_using_workbench()
Returns the current value of the '''using_workbench''' flag.
- join(*args)
Like 'os.path.join', but it allows only a module as the first argument.
This is useful when creating lists of plug-in definition file names when defining an application.
Imported Names
| Local name | Refers to |
|---|---|
| Application | enthought.envisage.core.application.Application |
| ApplicationObject | enthought.envisage.core.application_object.ApplicationObject |
| ExtensionItem | enthought.envisage.core.extension_item.ExtensionItem |
| ExtensionPoint | enthought.envisage.core.extension_point.ExtensionPoint |
| InstanceUOL | enthought.envisage.traits.InstanceUOL |
| Plugin | enthought.envisage.core.plugin.Plugin |
| PluginDefinition | enthought.envisage.core.plugin_definition.PluginDefinition |
| Runnable | enthought.envisage.core.runnable.Runnable |
| UOL | enthought.envisage.traits.UOL |