[Yt-svn] yt-commit r1241 - in trunk/yt: . raven
mturk at wrangler.dreamhost.com
mturk at wrangler.dreamhost.com
Tue Mar 31 10:11:53 PDT 2009
Author: mturk
Date: Tue Mar 31 10:11:48 2009
New Revision: 1241
URL: http://yt.spacepope.org/changeset/1241
Log:
Bind the variables 'pf' and 'ehds' inside the IVTK shell, and add a 'vtk'
subcommand to the 'yt' runner
Modified:
trunk/yt/commands.py
trunk/yt/raven/VTKInterface.py
Modified: trunk/yt/commands.py
==============================================================================
--- trunk/yt/commands.py (original)
+++ trunk/yt/commands.py Tue Mar 31 10:11:48 2009
@@ -273,6 +273,16 @@
if opts.zlim: pc.set_zlim(*opts.zlim)
pc.save(os.path.join(opts.output,"%s" % (pf)))
+ def do_vtk(self, subcmd, opts):
+ """
+ Start the VTK interface (if installed)
+
+ ${cmd_usage}
+ ${cmd_option_list}
+ """
+ import yt.raven.VTKInterface
+ yt.raven.VTKInterface.run_vtk()
+
def do_rpdb(self, subcmd, opts, arg):
"""
Connect to a currently running (on localhost) rpd session.
Modified: trunk/yt/raven/VTKInterface.py
==============================================================================
--- trunk/yt/raven/VTKInterface.py (original)
+++ trunk/yt/raven/VTKInterface.py Tue Mar 31 10:11:48 2009
@@ -295,6 +295,7 @@
field = Str("Density")
center = CArray(shape = (3,), dtype = 'float64')
window = Instance(ivtk.IVTKWithCrustAndBrowser)
+ python_shell = Delegate('window')
scene = Delegate('window')
# UI elements
@@ -324,9 +325,11 @@
HasTraits.__init__(self, **traits)
self.window.open()
self.scene = self.window.scene
+ self.python_shell.bind("ehds", self)
def _import_hierarchy_fired(self):
self.pf = lagos.EnzoStaticOutput(self.parameter_fn[:-10])
+ self.python_shell.bind("pf", self.pf)
self.extracted_hierarchy = ExtractedHierarchy(
self.pf, self.min_grid_level, self.max_grid_level,
offset=None)
More information about the yt-svn
mailing list