##// END OF EJS Templates
Merge pull request #3203 from takluyver/cell-magics-wholecell...
Merge pull request #3203 from takluyver/cell-magics-wholecell Separate InputSplitter for transforming whole cells This allows cell magics to include blank lines once again (closes #3178). InteractiveShell now has two input splitters: - `input_splitter` is used to determine when a block of input is complete, so you can use a cell magic in the terminal by leaving a blank line at the end. - `input_transformer_manager` is used to transform whole cells, so cell magics affect the whole of their cell. I removed the similar concept of 'input modes' for InputSplitter, because it was bound to get conflated, and it made the code rather hard to follow.

File last commit:

r9320:4c9aabba
r10256:410df964 merge
Show More
ipython.py
24 lines | 848 B | text/x-python | PythonLexer
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""IPython -- An enhanced Interactive Python
The actual ipython script to be installed with 'python setup.py install' is
generated by setuptool via the `console_scripts` mechanism. This file is here
(ipython source root directory) to facilitate non-root 'zero-installation'
(just copy the source tree somewhere and run ipython.py) and development.
"""
if __name__ != "__main__":
raise RuntimeError('You are trying to import the ipython.py executable. '
'Did you mean to call "import IPython" (case-sensitive) instead?')
# Ensure that the imported IPython is the local one, not a system-wide one
import os, sys
this_dir = os.path.dirname(sys.argv[0])
sys.path.insert(0, this_dir)
# Now proceed with execution
execfile(os.path.join(
this_dir, 'IPython', 'scripts', 'ipython'
))