[SciPy-user] scipy workflow

Barry Wark barrywark@gmail....
Mon Sep 29 17:37:55 CDT 2008


On Mon, Sep 29, 2008 at 9:14 AM, Michael Hearne <mhearne@usgs.gov> wrote:
> 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.

If you are an emacs user, I urge you to check out the IPython (minor?)
mode, ipython.el (in the ipython distribution) . It allows much
tighter integration of editor and IPython session, more like Matlab.
If you're a Mac user, I'd also urge you to check out TextMate. You can
achieve similar editor/command-line integration in TextMate using
AppleScript (email me offline if you're interested...I haven't gotten
all of the relevant code posted anywhere yet).

-Barry

>
> 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.
> ------------------------------------------------------
>
> _______________________________________________
> SciPy-user mailing list
> SciPy-user@scipy.org
> http://projects.scipy.org/mailman/listinfo/scipy-user
>


More information about the SciPy-user mailing list