[Tutor] ctypes question

Pacific Morrowind pacificmorrowind at gmail.com
Mon Mar 7 16:36:52 CET 2011


Hi

On 07/03/2011 7:02 AM, Albert-Jan Roskam wrote:
> Hi,
> I want to use a dll to read Spss data files. But when I use
> lib = ctypes.cdll.LoadLibary("d:/temp/spssio32.dll")
> I get a WindowsError (cannot find module), even though the path 
> exists. Why is that? Do I need to extend some environment variable 
> (add another dir)? I am using Python 2.5 on Windows 2000, but I also 
> unsuccessfully tried it using Python 2.7 on Ubuntu 10 (however, I 
> don't want to write the program on a linux system because I'll be 
> using it on windows only). I also got the same error when I tried some 
> other dll's.
but that path doesn't actually exist... replace that path with either 
r"d:/temp/spssio32.dll" or with "d://temp//spssio32.dll"; otherwise the 
/t will be transformed into a tab.
Nick
> Thanks in advance!
> Cheers!!
> Albert-Jan
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> All right, but apart from the sanitation, the medicine, education, 
> wine, public order, irrigation, roads, a fresh water system, and 
> public health, what have the Romans ever done for us?
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
>
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20110307/c1901ceb/attachment.html>


More information about the Tutor mailing list