Re: New free DLL for calling Python from IDL! [message #88339 is a reply to message #88332] |
Tue, 15 April 2014 12:53   |
yuxipang
Messages: 3 Registered: April 2014
|
Junior Member |
|
|
Hi Helder,
I can run the codes (see below) provided by Chris Torrence on my OS64 Win7 laptop. I put the Slither.DLL and Slither.DLM in a separate directory on the IDL path, and added the following lines in the startup.pro file (based on suggestions from Ronn Kline's ebook).
PREF_SET, 'IDL_DLM_PATH', 'C:\WorkSpace\IDL\Slither\python33; <IDL_DEFAULT>', /COMMIT
When I put slither DLL/DLM files in the directory of C:\Program Files\Exelis\IDL83\bin\bin.x86_64\, it did not work for me.
The standard Python 3.3.3 and its extension packages (matplotlib, numpy and others)were downloaded from following sites ...
https://www.python.org/downloads/
http://www.lfd.uci.edu/~gohlke/pythonlibs/
========================================
plt = pyimport("matplotlib.pyplot")
sizes = [15,30,45,10]
labels = ['Frogs', 'Hogs', 'Dogs', 'Logs']
colors = ['yellowgreen', 'gold', 'lightskyblue', 'lightcoral']
explode = [0, 0.1, 0, 0]
p = plt.pie(sizes, explode=explode, labels=labels, colors=colors, $
autopct='%1.1f%%', shadow=1, startangle=90)
void = plt.axis('equal')
void = plt.show(block=1) ; block=0 used by Chris
=======================================
IDL> !VERSION
{
ARCH: "x86_64",
OS: "Win32",
OS_FAMILY: "Windows",
OS_NAME: "Microsoft Windows",
RELEASE: "8.3",
BUILD_DATE: "Nov 15 2013",
MEMORY_BITS: 64,
FILE_OFFSET_BITS: 64
}
========================================
Hope this helps, if you have any additional questions, please send me an email.
Yuxi
|
|
|