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

r2052:321c2741
r2426:61e33e8e
Show More
test_imports.py
38 lines | 882 B | text/x-python | PythonLexer
#!/usr/bin/env python
# encoding: utf-8
def test_import_coloransi():
from IPython.utils import coloransi
def test_import_DPyGetOpt():
from IPython.utils import DPyGetOpt
def test_import_generics():
from IPython.utils import generics
def test_import_genutils():
from IPython.utils import genutils
def test_import_ipstruct():
from IPython.utils import ipstruct
def test_import_platutils():
from IPython.utils import platutils
def test_import_PyColorize():
from IPython.utils import PyColorize
def test_import_rlineimpl():
from IPython.utils import rlineimpl
def test_import_strdispatch():
from IPython.utils import strdispatch
def test_import_upgradedir():
from IPython.utils import upgradedir
def test_import_wildcard():
from IPython.utils import wildcard
def test_import_winconsole():
from IPython.utils import winconsole