My main two uses of ipython are for: 1) Testing code at the command line that I'm trying to write in a script. Regular expressions, for example, are not something I can code in my head. 2) Using the debugger (run -d script.py). This is a huge help for me. The debugger interaction is not as good as Matlab's - for example, if you want to set a breakpoint in a module contained in a different file than your "main", there's a lot of typing. It would eventually be nice to have a graphical debugger, where you could click on the line of code to set a breakpoint. I use "reset" in ipython to re-import modules after modifying the code. The only annoying thing about that is getting prompted (yes, I really want to blow away all of my variables!) massimo sandal wrote:
João Quinta da Fonseca wrote:
I have given up Matlab and I it feels great to use scipy for my scientific computing needs. However, I find that I use scipy just like I used matlab, with ipython as my terminal. Although this works OK, some things are a little frustrating: updated modules need to be reimported after modification, running scripts requires the run command etc., but this is to be expected because scipy is not matlbab. Now I don't want the matlab way necessarily and I am happy to learn a new way to do things. I guess what I would like to do is do things the python way, which I think means writing my code as classes with the _main_ bit at the end etc., but I am not sure whether that is the best way and if so, what is the best way to learn it. Does any one feel like sharing what their workflow with scipy is? Any tips for me?
Apart from the data analysis software where I use scipy as a library, I practically only write scripts, without interactive use.
I feel there is more control this way. I don't see much purpose in interactive use.
However, you can also write procedural scripts (without classes etc.) in Python... no need to delve into OO programming if you don't need to (although I like OO personally).
m.
_______________________________________________ SciPy-user mailing list SciPy-user@scipy.org http://projects.scipy.org/mailman/listinfo/scipy-user
-- ------------------------------------------------------ Michael Hearne mhearne@usgs.gov (303) 273-8620 USGS National Earthquake Information Center 1711 Illinois St. Golden CO 80401 Senior Software Engineer Synergetics, Inc. ------------------------------------------------------