In Modern IDL, I give a short demo of using pyIDL to use IDL from within a Python session. I have had problems with installing pyIDL lately, but didn’t have an alternative until I found pIDLy recently. It easy_install
s nicely and has an even nicer interface:
>>> import pidly
>>> idl = pidly.IDL()
>>> idl('x = total([1, 1], /int)')
>>> print idl.ev('x')
2
>>> print idl.ev('x ^ 2')
4
>>> idl.reform(range(4), 2, 2)
array([[0, 1],
[2, 3]])
>>> idl.histogram(range(4), binsize=3, L64=True)
array([3, 1], dtype=int64)
>>> idl.pro('plot', range(10), range(10), xstyle=True, ystyle=True)
>>> idl.interact()
IDL> print, x
4
IDL> exit
>>> idl.close()
I don’t see any versioned releases since 2008, but there are commits to the GitHub repo in the last few months so I believe the project is still alive. In any case, it does what I need right now and I can install it. Updating book to use pIDLy…
July 31st, 2012 at 2:40 am
I’m honoured! pIDLy is still just about alive. I’m not using python or IDL much these days, but I recently uploaded pIDLy to GitHub to make it easier for others to contribute, if anyone wants to.
July 31st, 2012 at 6:31 am
Ah, good move, thanks! Right now, it seems to do everything I need and works with IDL 8.2, but it’s nice to now that we can make contributions if things break.
September 3rd, 2012 at 12:14 pm
Hi,
I was actually wondering about the opposite. Calling python from within IDL (specifically, using python plotting routines and output after doing all data processing in IDL). Any idea how this might be accomplished?
September 4th, 2012 at 9:14 am
Slither from Jacquette Consulting allows calls to Python from IDL.
October 11th, 2013 at 12:10 pm
What ever happened to Slither? It seems to have disappeared.
October 11th, 2013 at 12:18 pm
It seems to have been retired.