Communicating with a DLL under Linux

Mikael Olofsson mikael at isy.liu.se
Tue Mar 13 12:59:39 EDT 2007


I am interested in peoples experience with communicating with DLLs under 
Linux.

Situation:

I'm an electrical engineer that finds pleasure in using my soldering 
iron from time to time. I also find programming, preferably in Python, 
entertaining. I wouldn't call myself a programmer, though. Now, I may 
have found a hobby project that could give me the pleasure from both 
those worlds. There's this USB development gadget for sale in my 
favourite electronics store, and I sure would like to have something 
like that connected to my lab computer (a fairly new budget computer 
running Kubuntu 6.06).

The gadget costs about 50 Euros. It's not a lot of money, but I would 
not like to buy the thing if there is a substancial risk that I will not 
be able to make it work on that computer. From what I've read on the 
box, it assumes Windows (a number of versions), it includes a DLL to 
communicate with it, and example code in VB (iirc). For the interested, 
here's the gadget:

    http://www.elfa.se/elfa-bin/dyndok.pl?lang=en&vat=0&dok=9001.htm

I have been looking at ctypes, and from what I read, I should be able to 
communicate with a DLL by using ctypes. It even sounds fairly easy, as 
long as I know what the DLL is supposed to do. I expect there to be some 
kind of manual for the DLL included in the box. Are DLLs universal, or 
are there different DLLs for Windows and Linux (I'm not a programmer, 
remember)? If the vendor claims that the DLL is for Windows, is it 
reasonable to assume that it can be made to work under Linux, from 
Python, that is? Or is this perhaps completely out of the question?

So, who is willing share their experiences? Share advice? Is this as 
easy as it sounds to me? Any pitfalls around?

Regards
/MiO



More information about the Python-list mailing list