Debian Codegraph @

envisage/examples/demo/plugins/tasks/run_attractor.py

raw
1 # (C) Copyright 2007-2025 Enthought, Inc., Austin, TX
2 # All rights reserved.
3 #
4 # This software is provided without warranty under the terms of the BSD
5 # license included in LICENSE.txt and may be redistributed only under
6 # the conditions described in the aforementioned license. The license
7 # is also available online at http://www.enthought.com/licenses/BSD.txt
8 #
9 # Thanks for using Enthought open source!
10
11 # Plugin imports.
12 from envisage.api import CorePlugin
13 from envisage.ui.tasks.api import TasksPlugin
14
15
16 def main(argv):
17 """Run the application."""
18 # Import here so that this script can be run from anywhere without
19 # having to install the packages.
20 from attractors.attractors_application import AttractorsApplication
21 from attractors.attractors_plugin import AttractorsPlugin
22
23 plugins = [CorePlugin(), TasksPlugin(), AttractorsPlugin()]
24 app = AttractorsApplication(plugins=plugins)
25 app.run()
26
27
28 if __name__ == "__main__":
29 import sys
30
31 # This context manager is added so that one can run this example from any
32 # directory without necessarily having installed the examples as packages.
33 from envisage.examples._demo import demo_path
34
35 with demo_path(__file__):
36 main(sys.argv)