[SciPy-User] Porting code from IDL to Python - 'Common block' equivalent?

Christopher Barker Chris.Barker@noaa....
Fri Jul 23 11:41:16 CDT 2010


David Andrews wrote:
> Now it's just a matter of converting ~13k lines of IDL into python :D

A little piece of advice here -- I would resist the urge to "convert" 
your code line by line, or even function by function.

I'm not familiar with IDL, but I do know that you will be much happier 
in the long run with a code structure that is natural in Python. IIUC, 
IDL is an array-oriented language, so that part will hopefully be a 
natural transition, but from the sounds of it the overall code structure 
may need to be quite different.

So, think about the project as a whole, and how it can best be 
structured in Python, and start from there.

Oh, and write unit-tests from the beginning!

-Chris





-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

Chris.Barker@noaa.gov


More information about the SciPy-User mailing list