##// END OF EJS Templates
Add transformers to understand code pasted with >>> or IPython prompts....
Add transformers to understand code pasted with >>> or IPython prompts. Now the following all work out of the box: In [8]: In [6]: for i in range(5): ...: ...: print i, ...: ...: ...: 0 1 2 3 4 In [10]: >>> width = 20 In [11]: >>> height = 5*9 In [12]: >>> width * height Out[12]: 900 And the history is still clean: In [13]: %hist -n [snipped] for i in range(5): print i, get_ipython().magic("hist -n") width = 20 height = 5*9 width * height This will be extremely useful when copy/pasting from interactive tutorials, doctests and examples. Also fixes %doctest_mode: https://bugs.launchpad.net/ipython/+bug/505404

File last commit:

r2267:928c921b
r2426:61e33e8e
Show More
ipy_stock_completers.py
17 lines | 529 B | text/x-python | PythonLexer
/ IPython / quarantine / ipy_stock_completers.py
vivainio
added ipy_completers.py, ipy_stock_completers.py now only ENABLES the completers as opposed to implementing them
r589 """ Install various IPython completers
vivainio
merge all from 0.7.3 branch to trunk
r503
vivainio
create app_completes, move non-core completers there, install stock completers as default, ipy_signals in sh profile
r681 IPython extension that installs completers related to core ipython behaviour.
vivainio
merge all from 0.7.3 branch to trunk
r503
Brian Granger
Renaming Extensions=>extensions in code and imports.
r2064 The actual implementations are in extensions/ipy_completers.py
vivainio
merge all from 0.7.3 branch to trunk
r503
"""
Brian Granger
ipapi.py => core/ipapi.py and imports updated.
r2027 from IPython.core import ipapi
vivainio
merge all from 0.7.3 branch to trunk
r503
Brian Granger
ipapi.py => core/ipapi.py and imports updated.
r2027 ip = ipapi.get()
vivainio
merge all from 0.7.3 branch to trunk
r503
vivainio
added ipy_completers.py, ipy_stock_completers.py now only ENABLES the completers as opposed to implementing them
r589 from ipy_completers import *
vivainio
merge all from 0.7.3 branch to trunk
r503
ip.set_hook('complete_command', module_completer, str_key = 'import')
ip.set_hook('complete_command', module_completer, str_key = 'from')
ip.set_hook('complete_command', runlistpy, str_key = '%run')
ip.set_hook('complete_command', cd_completer, str_key = '%cd')