Skip to content

Commit

Permalink
Merge branch 'master' of github.com:inducer/pudb
Browse files Browse the repository at this point in the history
  • Loading branch information
inducer committed Jun 10, 2016
2 parents 33ce62c + 3e0188c commit f84b4b7
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion pudb/shell.py
Expand Up @@ -12,6 +12,12 @@
else:
HAVE_IPYTHON = True


if HAVE_IPYTHON:
from IPython import version_info as IPYTHON_VERSION
else:
IPYTHON_VERSION = None

try:
import bpython # noqa
# Access a property to verify module exists in case
Expand Down Expand Up @@ -154,7 +160,13 @@ def run_ipython_shell_v11(locals, globals, first_time):
old_globals = shell.user_global_ns
# Update shell with current namespace
_update_ns(shell, locals, globals)
shell.mainloop(banner)

args = []
if IPYTHON_VERSION < (5, 0, 0):
args.append(banner)
else:
print(banner)
shell.mainloop(*args)
# Restore originating namespace
_update_ns(shell, old_locals, old_globals)

Expand Down

0 comments on commit f84b4b7

Please sign in to comment.