Ticket #12735: django_shell.patch
File django_shell.patch, 965 bytes (added by , 15 years ago) |
---|
-
core/management/commands/shell.py
24 24 # Don't bother loading IPython, because the user wants plain Python. 25 25 raise ImportError 26 26 import IPython 27 # Explicitly pass an empty list as arguments, because otherwise IPython 28 # would use sys.argv from this script. 29 shell = IPython.Shell.IPShell(argv=[]) 27 try: 28 # Explicitly pass an empty list as arguments, because otherwise IPython 29 # would use sys.argv from this script. 30 shell = IPython.Shell.IPShell(argv=[]) 31 except AttributeError: 32 shell = IPython.InteractiveShell() 30 33 shell.mainloop() 31 34 except ImportError: 32 35 import code