ipython on windows

iPython is a very nice way to fiddle around with Python interactively. Most beginners just use IDLE for this, since it comes with Python. But as you get to plotting stuff, you’ll find that IDLE just doesn’t cut it (it freezes every time you plot anything). So you try the regular python command line (on the black screen) but get frustrated that you can’t change directories or use tabbed completion or anything. You hear about ipython and try to use it but it’s not very obvious. Well all you have to do is make a shortcut and you’ll be off and running.By the way, if you had started on Linux in the first place, you wouldn’t have to deal with all this! Anyway, on Windows,

0. Make sure you have Python installed with matplotlib and numpy modules.

1. Get ipython from http://ipython.scipy.org/ install it from the download page for your version of python

2. Make a shortcut to python.exe and then right click it and hit properties to change where it points to to:

3. Double click the shortcut.

Yay. Now you have ipython on windows with matplotlib interactive capabilities! I suggest having your text editor open in one window and this ipython window in the other. Edit your code, save it, and then type “run mycode.py” to run it in the interpreter.

A nice screenshot of an interactive matplotlib session on Windows

Anyway.

Leave a Reply

Your email address will not be published. Required fields are marked *