[Numpy-discussion] Numeric3

Fernando Perez Fernando.Perez at colorado.edu
Tue Feb 8 14:40:35 CST 2005


Chris Barker wrote:

> We all have different styles, but I was a user of Matlab for years, and 
> maybe it's because I'm not a very fast typist, but when I found myself 
> writing more than three lines at the prompt, I'd kick myself, and open 
> an editor, and write a script. The one thing I found a little lacking 
> when I started using python was an easy way to run a script inside an 
> interactive session:
> 
> execfile("filename.py")
> 
> is a bit clunky. However:
> 
> $ python -i filename.py
> 
> Is not so bad at the command prompt, when all you have to do is hit the 
> up-arrow key and run it again.

I know it's bad manners to promote your own stuff, but have you had a look at 
ipython?  The run command in ipython gives you this, plus much, much more 
(debugger access on exceptions, colored tracebacks with detail control, 
automatic profiling, namespace control,...).  My workmode is Xemacs open with 
the files + ipython using 'run foo' to rerun my foo.py script as many times as 
needed.

Sorry for the plug, but since I've spent 3 years tuning ipython precisely to 
make interactive numerical work as pleasant and efficient as possible, I can't 
  resist :)

Regards,

f




More information about the Numpy-discussion mailing list