Edit your code in IPython
IPython makes it easy to edit source code, or create new scripts based on a couple of lines in your history, or paste examples from the web.
| edit script.py | Opens script.py in the default editor. NOTE: upon exit, the script executes |
| edit -x script.py | Opens script.py in the default editor. Upon exit, the script will not execute. |
| edit 1-3 6 | Opens the default editor to edit commands 1, 2, 3, and 6 in the history |
| save apple 1-3, 5 | Saves the history commands 1, 2, 3, and 5 in the file apple.py |
| cpaste | Tells IPython to expect code pasted from the clipboard. NOTE: type – on a line by itself to quit out of cpaste mode. |
Tags: IPython, IPython help, Python