##// END OF EJS Templates
Refactor of prompts and the displayhook....
Refactor of prompts and the displayhook. * Renamed CachedOutput to displayhook.DisplayHook. * Added methods that DisplayHook.__call__ uses to do its work. These methods can now be overridden for the ZMQ kernel. * Removed all hooks (result_display and generate_output_prompt) that the outputcache was using. We need to add these back in once we figure out what to do about hooks in general.

File last commit:

r2761:7b6e19f0
r2781:775b3992
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))