[Tutor] Unable to import xxx.pyd

Andreas Kostyrka andreas at kostyrka.org
Fri May 26 13:23:25 CEST 2006


Well, xxx.pyd -> dynamic binary python module on Windows.
security value "755" suggests that you are trying to install it on a
Linux/Unix host.

Sorry, but dynamic binary modules on Linux end in ".so" (every Unix
treats that a little bit different, HPUX e.g. uses .sl, etc.)

And no, you cannot just copy a .pyd file from a Windows distribution to
a Linux host and expect it to work. (Actually .pyd files are sometimes
incompatible between differently compiled Python versions on Win32)

Andreas

Am Donnerstag, den 25.05.2006, 14:20 -0500 schrieb URBAN LANDREMAN:
> I'm debugging a program where I'm trying to import a file named xxx.pyd.
> 
> I test the logic interactively with IDLE and see that it makes a difference 
> on which directory the file xxx.pyd is located.  That is, I can get it to 
> work when xxx.pyd is on the path.
> 
> However, when I run the program in batch
> #!/usr/local/bin/python
> import cgitb; cgitb.enable()
> print "Content-type: text/html"
> print
> print "<pre>"
> import sys
> print sys.path
> import xxx
> 
> I get the error message: No module named xxx, even though I know that the 
> file xxx.pyd is on the path.  If I put a file xxx.py in the same folder, the 
> system finds that file.
> 
> The file xxx.pyd has security numeric value 755, so the system should be 
> able to find it.
> 
> I'm baffled.
> 
> Any suggestions of what my be causing the system to not find xxx.pyd?
> 
> Thanks.
> 
> 
> Urban Landreman
> 
> 
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Dies ist ein digital signierter Nachrichtenteil
Url : http://mail.python.org/pipermail/tutor/attachments/20060526/0e6c0468/attachment.pgp 


More information about the Tutor mailing list