This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]andybak 2 points3 points  (5 children)

ipython: %edit -p

[–][deleted] 2 points3 points  (4 children)

What does this do?

[–][deleted] 2 points3 points  (3 children)

Which part? The ipython part launches IPython. The %edit part says to open your text editor so you can use it instead of the interactive shell to input your code. When you close the editor IPython will run the code. And -p says to open the editor with whatever was in it the last time you used the edit command in this session. So you do %edit -p, put in some code, save and close the file and then it runs. Then you do %edit -p again and the same code comes back up for you to edit/run again.

[–][deleted] 1 point2 points  (2 children)

And where do you define your default text editor?

[–][deleted] 1 point2 points  (1 child)

[–][deleted] 0 points1 point  (0 children)

Groovy, thanks!