Permalink
Browse files

fixed #28 solved problems with new versions of IPython

  • Loading branch information...
1 parent d1afa6e commit 5bd6448df48131fd3f32dda00f74148fc0cc3d88 sqrbass committed Apr 14, 2010
Showing with 6 additions and 2 deletions.
  1. +6 −2 django_extensions/management/commands/shell_plus.py
@@ -54,10 +54,14 @@ def handle_noargs(self, **options):
from bpython import embed
embed(imported_objects)
except ImportError:
- import IPython
# Explicitly pass an empty list as arguments, because otherwise IPython
# would use sys.argv from this script.
- shell = IPython.Shell.IPShell(argv=[], user_ns=imported_objects)
+ try:
+ from IPython.core.iplib import InteractiveShell
+ shell = InteractiveShell(user_ns=imported_objects)
+ except ImportError:
+ import IPython
+ shell = IPython.Shell.IPShell(argv=[], user_ns=imported_objects)
shell.mainloop()
except ImportError:
# Using normal Python shell

0 comments on commit 5bd6448

Please sign in to comment.