Re: Top 10 IDL Requests ... python [message #20977] |
Thu, 03 August 2000 00:00  |
Kristian Kjaer
Messages: 58 Registered: June 1998
|
Member |
|
|
> "Paul van Delst" <pvandelst@ncep.noaa.gov> wrote in message
> news:398825D1.B3B3F605@ncep.noaa.gov...
>
>> It won't make me stop using IDL, but I find it hard to counter his
>> argument when he can do in Python pretty much everything I can in
>> IDL.
>
Mark Hadfield wrote:
> Can he really? Even graphics? Perhaps I'd better take another look at
> Python!
Can all our existing *.pro files be used with python?
If not, would it be easy to convert them?
- Kristian Kjær, Risø Natl. Laboratory, Denmark
|
|
|
Re: Top 10 IDL Requests ... python [message #21045 is a reply to message #20977] |
Fri, 04 August 2000 00:00  |
Paul van Delst
Messages: 364 Registered: March 1997
|
Senior Member |
|
|
Mark Hadfield wrote:
>
> "Kristian Kjaer" <Kristian.Kjaer@Risoe.Dk> wrote in message
> news:3989B2D1.8A3D3153@Risoe.Dk...
>> Can all our existing *.pro files be used with python?
>> If not, would it be easy to convert them?
>
> I'm afraid the answers are NO and NO. It's a completely different language.
> The scientific graphics subsystem is--from the little I know about
> it--completely different from either direct or object graphics.
He's using python but what he's developing he calls PYDL, i.e. an
interpreter that runs within Python. Some sample command line code:
PYDL> x = dindgen(100)/100.0 * 4.0 * pi
PYDL> y1 = sin(x)
PYDL> y2 = cos(x)
PYDL> set_plot('ps')
PYDL> device(file='nicks_test.ps')
PYDL> plot(x,y1, xtitle='Theta',ytitle='SIN/COS', \
title='Trigonometry Functions', \
nodata=1, xrange=[0,12])
PYDL> oplot(x,y1, color=2)
PYDL> oplot(x,y2, color=3)
PYDL> device(close=1)
I think most IDL programmers will recognise what's going on. He always
told me he disliked the IDL syntax punctuation - hence the use of "()"
instead of the ",", e.g. plot(x,y) instead of plot, x, y.
Personally I never understood why this bothered people. Doesn't C
require a ";" at the end of each line?
Same dog, different leg I reckon.
paulv
--
Paul van Delst Ph: (301) 763-8000 x7274
CIMSS @ NOAA/NCEP Fax: (301) 763-8545
Rm.202, 5200 Auth Rd. Email: pvandelst@ncep.noaa.gov
Camp Springs MD 20746
|
|
|
|