Package: pyIDL
pyIDL# Python bindings for IDL, based on Andrew McMurry's python-IDL# Requires ITT's IDL and numarray# Download pyIDL source tarfile# Installationunzup and unpack the gzipped tar archive$ tar -xvzf pyIDL-0.6.tgzset environment variables(paths will depend on IDL installation and platform)$ export IDL_VERSION = '6.4'$ export IDL_INCDIR = '/itt/idl/external/include'$ export IDL_BINDIR = '/itt/idl/bin/bin.linux.x86'$ export X11_LIBDIR = '/usr/lib/'  (linux only)install the package$ python setup.py build$ python setup.py install(alternatively, a Makefile is included)# Documentationimport the idl class>>> from pyIDL import idlinstantiate the idl class>>> ri = idl()get help>>> print ri.doc()Python-IDL bindingseval(command):execute an IDL commandget(name,[array,allowNone]):fetch a variable from IDLput(name,value,[array,type,allowNone]):push a variable to IDLwho([name,local,stdout]):print/return the IDL/local variableshelp([name]):print the IDL help message (for a variable)delete(name):destroy selected IDL variablesmap([name]):get the IDL data type mappingprompt():an interactive IDL session_print(value):print using the IDL print commandpush python variables into IDL and interact with IDL scripting language>>> from numarray import *>>> x = []>>> for i in range(21): x.append(i*pi/10)...>>> ri.put('x',x)>>> ri.eval('y = sin(x)')>>> ri.eval('plot, x,y')use the interactive prompt>>> ri.prompt()IDL interface:% At $MAIN$X               DOUBLE    = Array[21]Y               DOUBLE    = Array[21]Compiled Procedures:$MAIN$Compiled Functions:IDL> IF x[0] LT 1 $IDL> THEN print, x0.0000000      0.31415927      0.62831853      0.94247780      1.25663711.5707963       1.8849556       2.1991149       2.5132741      2.82743343.1415927       3.4557519       3.7699112       4.0840704      4.39822974.7123890       5.0265482       5.3407075       5.6548668      5.96902606.2831853IDL> exitcheck variables in IDL session>>> ri.who().keys()['Y', 'X']>>> ri.who('y')[0.0, 0.3090169943749474, 0.58778525229247314, 0.80901699437494745,0.95105651629515353, 1.0, 0.95105651629515364, 0.80901699437494745,0.58778525229247325, 0.30901699437494751, 1.2246063538223773e-16,-0.3090169943749469, -0.58778525229247303, -0.80901699437494734,-0.95105651629515353, -1.0, -0.95105651629515364, -0.80901699437494756,-0.58778525229247336, -0.30901699437494762, -2.4492127076447545e-16]get variables back into python from IDL>>> sinx = ri.get('y')use shortcuts for put, eval, and get>>> ri.z = 0.5>>> ri('print, z')0.50000000>>> ri.z + 11.5delete variables from IDL>>> ri.delete('x')>>> ri.delete('y')use IDL function/procedure directly from python>>> ri.sin(x)[0.0, 0.3090169943749474, 0.58778525229247314, 0.80901699437494745,0.95105651629515353, 1.0, 0.95105651629515364, 0.80901699437494745,0.58778525229247325, 0.30901699437494751, 1.2246063538223773e-16,-0.3090169943749469, -0.58778525229247303, -0.80901699437494734,-0.95105651629515353, -1.0, -0.95105651629515364, -0.80901699437494756,-0.58778525229247336, -0.30901699437494762, -2.4492127076447545e-16]# Versions0.6: 07/18/07added support for idl_6.4fixed boolean support in direct IDL function/procedure calls0.5: 04/18/07fixed support for python2.50.4.1: 12/01/06fixed support for mac os0.4: 10/06/06added support for idl_6.3improved support for NumPyremoved dependency on Numeric0.3: 06/09/06improved support for Numericadded _printextended examples0.2: 05/19/06support for 64-bit platformsshortcuts for put, get, evalaccess IDL functions/procedures from pythonadded examples directory0.1: 06/21/05initial; python bindings for RSI's IDLinteractive IDL prompt