[sagenb] 150/179: Use the Sage displayhook, otherwise graphics is not shown (trac #14469)

felix salfelder felix-guest at moszumanska.debian.org
Tue May 6 12:05:22 UTC 2014


This is an automated email from the git hooks/post-receive script.

felix-guest pushed a commit to branch master
in repository sagenb.

commit 89c6b6ced13733bcedff7c18ae49ba0dc8db0457
Author: Volker Braun <vbraun.name at gmail.com>
Date:   Fri Aug 2 23:14:21 2013 -0400

    Use the Sage displayhook, otherwise graphics is not shown (trac #14469)
---
 sagenb/misc/support.py | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/sagenb/misc/support.py b/sagenb/misc/support.py
index ad78eda..2f10f6b 100644
--- a/sagenb/misc/support.py
+++ b/sagenb/misc/support.py
@@ -31,7 +31,7 @@ except ImportError:
 
 try:
     from sagenb.misc.sphinxify import sphinxify, is_sphinx_markup
-except ImportError, msg:
+except ImportError as msg:
     print msg
     print "Sphinx docstrings not available."
     # Don't do any Sphinxifying if sphinx's dependencies aren't around
@@ -40,6 +40,14 @@ except ImportError, msg:
     def is_sphinx_markup(s):
         return False
 
+try:
+    from sage.misc.displayhook import DisplayHook
+    sys.displayhook = DisplayHook()
+except ImportError as msg:
+    print msg
+    print 'Graphics will not be shown automatically'
+
+
 ######################################################################
 # Initialization
 ######################################################################

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/sagenb.git



More information about the debian-science-commits mailing list