API Reference for Enthought Tool Suite 3.2.0
Returns True if the UI event loop is running.
Start interacting with the figure.
By default, this function simply creates a GUI and starts its event loop if needed.
If it is used as a decorator, then it may be used to decorate a function which requires a UI. If the GUI event loop is already running it simply runs the function. If not the event loop is started and function is run in the toolkit's event loop. The choice of UI is via ETSConfig.toolkit.
If the argument stop is set to True then it pops up a UI where the user can stop the event loop. Subsequent calls to show will restart the event loop.
Parameters
stop: A boolean which specifies if a UI dialog is displayed which allows the event loop to be stopped.
Examples
Here is a simple example demonstrating the use of show:
>>> from enthought.mayavi import mlab >>> mlab.test_contour3d() >>> mlab.show()
You can stop interaction via a simple pop up UI like so:
>>> mlab.test_contour3d() >>> mlab.show(stop=True)
The decorator can be used like so:
>>> @mlab.show ... def do(): ... mlab.test_contour3d() ... >>> do()
The decorator can also be passed the stop argument:
>>> @mlab.show(stop=True) ... def do(): ... mlab.test_contour3d() ... >>> do()
| Local name | Refers to |
|---|---|
| Any | enthought.traits.trait_types.Any |
| ApplicationWindow | enthought.pyface.application_window.ApplicationWindow |
| Button | enthought.traits.trait_types.Button |
| ETSConfig | enthought.etsconfig.etsconfig.ETSConfig |
| Group | enthought.traits.ui.group.Group |
| GUI | enthought.pyface.gui.GUI |
| HasTraits | enthought.traits.has_traits.HasTraits |
| Item | enthought.traits.ui.item.Item |
| View | enthought.traits.ui.view.View |
© Copyright 2002-2009 Enthought, Inc.