##// END OF EJS Templates
Created HistoryManager to better organize history control....
Created HistoryManager to better organize history control. This will put in a single location all history-related operations, and allow us to simplify the main classes further. Readline dependencies remain (for history saving/loading), this is only a first refactoring step.

File last commit:

r2761:7b6e19f0
r3079:ba4b5e81
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))