[Yt-svn] yt-commit r743 - trunk/scripts
joishi at wrangler.dreamhost.com
joishi at wrangler.dreamhost.com
Wed Aug 27 12:13:20 PDT 2008
Author: joishi
Date: Wed Aug 27 12:13:19 2008
New Revision: 743
URL: http://yt.spacepope.org/changeset/743
Log:
* added script to run yt in interactive mode. it first looks for ipython, and
boots into the 'pylab' environment if found. if not, it defaults to the
default python shell.
Added:
trunk/scripts/iyt
Added: trunk/scripts/iyt
==============================================================================
--- (empty file)
+++ trunk/scripts/iyt Wed Aug 27 12:13:19 2008
@@ -0,0 +1,21 @@
+#!python
+
+from yt.mods import *
+namespace = locals().copy()
+
+doc = """\
+
+Welcome to yt!
+
+"""
+
+try:
+ import IPython.Shell
+except:
+ print 'ipython is not available. using default python interpreter.'
+ import code
+ import sys
+ code.interact(doc, None, namespace)
+ sys.exit()
+
+IPython.Shell.IPShellMatplotlib(user_ns=namespace).mainloop(sys_exit=1,banner=doc)
More information about the yt-svn
mailing list