Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to open ipython command history on a text editor?

Tags:

ipython

I am using a windows machine and would like to open ipython history commands using the default text editor. Is there a command that allows me to do this? Thanks.

like image 347
Feng Mai Avatar asked Apr 17 '13 02:04

Feng Mai


1 Answers

%edit 1-4

That should open lines 1-4 from the current session in an editor. You can get previous sessions as well - run %hist? to see how the syntax works.

You may need to set the EDITOR environment variable to a command that launches your favourite editor.

like image 118
Thomas K Avatar answered Oct 21 '22 04:10

Thomas K