##// 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:

r2761:7b6e19f0
r2775:c291d5fa
Show More
inputlist.py
14 lines | 346 B | text/x-python | PythonLexer
class InputList(list):
"""Class to store user input.
It's basically a list, but slices return a string instead of a list, thus
allowing things like (assuming 'In' is an instance):
exec In[4:7]
or
exec In[5:9] + In[14] + In[21:25]"""
def __getslice__(self,i,j):
return ''.join(list.__getslice__(self,i,j))