# Don't bother loading IPython, because the user wants plain Python.
- # Explicitly pass an empty list as arguments, because otherwise IPython
- # would use sys.argv from this script.
- shell = IPython.Shell.IPShell(argv=)
+ from IPython.frontend.terminal.embed import TerminalInteractiveShell
+ shell = TerminalInteractiveShell()
+ # Explicitly pass an empty list as arguments, because otherwise
+ # IPython would use sys.argv from this script.
+ from IPython.Shell import IPShell
+ shell = IPShell(argv=)
+ # IPython not found at all, raise ImportError
# Set up a dictionary to serve as the environment for the shell, so