]> hydra-www.ietfng.org Git - dyna2/commitdiff
remove deprecation warning
authorTim Vieira <tim.f.vieira@gmail.com>
Wed, 8 Jan 2014 02:07:21 +0000 (21:07 -0500)
committerTim Vieira <tim.f.vieira@gmail.com>
Wed, 8 Jan 2014 02:07:21 +0000 (21:07 -0500)
Makefile
src/Dyna/Backend/Python/utils.py

index cf5c48c7a95f1e45a04b962103b58aecd641f550..ce9e5e2fe346d2fa5625230902bfb31af141afb8 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -75,8 +75,7 @@ sphinxbuild:
        (cd docs/sphinx; make html)
 
 sphinxdoc: sphinxbuild
-       python -c 'import webbrowser; \
-         webbrowser.open("./docs/sphinx/_build/html/index.html")'
+       python -m webbrowser "./docs/sphinx/_build/html/index.html"
 
 doc: sphinxbuild haddock
 
index 63bd66bfa3f0abda794b0e4814ead2cc10936173..648b45c7639b0f61ce334925d85a17745b37a7c7 100644 (file)
@@ -1,6 +1,14 @@
 import re
 from external.path import path  # used by other modules
-from IPython.frontend.terminal.embed import InteractiveShellEmbed
+
+try:
+    from IPython import embed as ip
+except ImportError:
+    from IPython.frontend.terminal.embed import InteractiveShellEmbed
+    # interactive IPython shell
+    ip = InteractiveShellEmbed(banner1 = 'Dropping into IPython\n')
+
+
 from config import dynahome, dotdynadir
 from collections import namedtuple, defaultdict
 from cStringIO import StringIO
@@ -75,10 +83,6 @@ def user_vars(variables):
                  if name.startswith('u') and not name.startswith('u_'))
 
 
-# interactive IPython shell
-ip = InteractiveShellEmbed(banner1 = 'Dropping into IPython\n')
-
-
 def get_module(cmd, sub):
     try:
         exec 'from %s.%s import %s as m' % (cmd, sub, sub)