[yt-svn] commit/yt: ngoldbaum: Prepending sys.path with current working directory when running via 'yt load'.

Bitbucket commits-noreply at bitbucket.org
Mon Oct 8 13:40:34 PDT 2012


1 new commit in yt:


https://bitbucket.org/yt_analysis/yt/changeset/b9838b15dbde/
changeset:   b9838b15dbde
branch:      yt
user:        ngoldbaum
date:        2012-10-08 22:39:33
summary:     Prepending sys.path with current working directory when running via 'yt load'.
The ipython embed api doesn't do this automatically for some reason.
affected #:  1 file

diff -r 39220cb0fde7eb0f1270e9a31591402a7e47679c -r b9838b15dbde418c6f7a8862b1499e67a5d1e6db yt/utilities/command_line.py
--- a/yt/utilities/command_line.py
+++ b/yt/utilities/command_line.py
@@ -1095,8 +1095,12 @@
                   )
         else:
             from IPython.config.loader import Config
+            import sys
             cfg = Config()
+            # prepend sys.path with current working directory
+            sys.path.insert(0,'')
             IPython.embed(config=cfg,user_ns=local_ns)
+            
 
 class YTMapserverCmd(YTCommand):
     args = ("proj", "field", "weight",

Repository URL: https://bitbucket.org/yt_analysis/yt/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.



More information about the yt-svn mailing list