PYTHONPATH on Windows XP module load problem

Andreas Otto aotto1968 at t-online.de
Tue May 19 10:52:30 EDT 2009


MRAB wrote:

> Andreas Otto wrote:
>> Hi,
>> 
>>   I have the following problem using python on windows.
>>   I crated a binary extension called
>> 
>>         pymsgque.dll
>> 
>>   on windows. The same extension works fine on UNIX/Linux.
>> 
>>   The problem is on Windows. The build is no problem
>>   but python is not able to load this extension with
>> 
>>         import pymsgque
>> 
>>   and create the following error:
>> 
>>   Traceback (most recent call last):
>>   File "server.py", line 13, in <module>
>>     import pymsgque
>> ImportError: No module named pymsgque
>> [31906 refs]
>> 
>>   the PYTHONPATH variable has the directory of
>>   pymsgque.dll location
>> 
>>   the build of python and the pymsgque extension was done using
>>         > Microsoft Visual C++ Express Edition
>> 
>>   it seems that I missing something
>> 
>> mfg
>> 
>>   Andreas Otto
> 
> Does this help?
> 
> http://pyfaq.infogami.com/is-a-pyd-file-the-same-as-a-dll

Hi,

  this link is nice but I'm still confused ...

  1. on LINUX I create a "pymsgque.so" and I can load this library
        with "import pymsgque"

  2. in WINDOWS, I expect to create a "pymsgque.dll" and do the
        same as on unix "import pymgque"

        -> is this behaviour is supported or not ???
 
  3. the hint with "*.pyd" is totally new to me and I don't know
        is this the "official" way to use dll's on windows or
        just a hack which works


mfg

  Andreas Otto




More information about the Python-list mailing list