##// END OF EJS Templates
Changing how IPython.utils.io.Term is handled....
Changing how IPython.utils.io.Term is handled. We used to create a module level IOTerm instance called IPython.utils.io.Term when IPython.utils.io was imported. We now delay this until InteractiveShell.init_io is called. This gives us a chance to override sys.stdout/sys.stderr first. All code that uses IPython.utils.io.Term must refer to by its full name: "IPython.utils.io.Term" and not hold references to it.

File last commit:

r2760:afe1263a
r2775:c291d5fa
Show More
ipython.py
18 lines | 665 B | text/x-python | PythonLexer
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""IPython -- An enhanced Interactive Python
The actual ipython script to be installed with 'python setup.py install' is
in './scripts' directory. This file is here (ipython source root directory)
to facilitate non-root 'zero-installation' (just copy the source tree
somewhere and run ipython.py) and development. """
# Ensure that the imported IPython is the local one, not a system-wide one
import os, sys
this_dir = os.path.dirname(os.path.abspath(__file__))
sys.path.insert(0, this_dir)
# Now proceed with execution
execfile(os.path.join(
this_dir, 'IPython', 'frontend', 'terminal', 'scripts', 'ipython'
))