[Yt-svn] yt-commit r1432 - branches/yt-1.5/yt trunk/yt

mturk at wrangler.dreamhost.com mturk at wrangler.dreamhost.com
Sun Sep 6 20:17:08 PDT 2009


Author: mturk
Date: Sun Sep  6 20:17:07 2009
New Revision: 1432
URL: http://yt.spacepope.org/changeset/1432

Log:
A check to see if we're running inside the SAGE notebook, in which case no
progress bar will be displayed.



Modified:
   branches/yt-1.5/yt/funcs.py
   trunk/yt/funcs.py

Modified: branches/yt-1.5/yt/funcs.py
==============================================================================
--- branches/yt-1.5/yt/funcs.py	(original)
+++ branches/yt-1.5/yt/funcs.py	Sun Sep  6 20:17:07 2009
@@ -174,6 +174,12 @@
             return DummyProgressBar()
     elif ytcfg.getboolean("yt","suppressStreamLogging"):
         return DummyProgressBar()
+    elif "SAGE_ROOT" in os.environ:
+        try:
+            from sage.server.support import EMBEDDED_MODE
+            if EMBEDDED_MODE: return DummyProgressBar()
+        except:
+            pass
     widgets = [ title,
             pb.Percentage(), ' ',
             pb.Bar(marker=pb.RotatingMarker()),

Modified: trunk/yt/funcs.py
==============================================================================
--- trunk/yt/funcs.py	(original)
+++ trunk/yt/funcs.py	Sun Sep  6 20:17:07 2009
@@ -174,6 +174,12 @@
             return DummyProgressBar()
     elif ytcfg.getboolean("yt","suppressStreamLogging"):
         return DummyProgressBar()
+    elif "SAGE_ROOT" in os.environ:
+        try:
+            from sage.server.support import EMBEDDED_MODE
+            if EMBEDDED_MODE: return DummyProgressBar()
+        except:
+            pass
     widgets = [ title,
             pb.Percentage(), ' ',
             pb.Bar(marker=pb.RotatingMarker()),



More information about the yt-svn mailing list