[Python-Dev] Re: Supporting Third Party Modules (was The other Py2.4issue)

"Martin v. Löwis" martin at v.loewis.de
Sun Dec 12 17:19:24 CET 2004


Fredrik Lundh wrote:
> the Python interpreter could initialize this DLL, using some suitable mechanism.

What suitable mechanism could that be? Suppose the Python script imports
foo.pyd, which in turn is linked with pythonany.dll, which in turn is
supposed to find the right Python DLL.

Now, python24.dll runs LoadLibary for foo.pyd, but has no control over
pythonany.dll. How could the suitable mechanism work?

> alternatively, it could figure out what EXE you used to start the program in the
> first place, and figure out what Python DLL that EXE uses.  my ExeMaker tool
> can do that, for example:
> 
>     http://effbot.org/zone/exemaker.htm
> 
> (see the #!python.exe entry in the table)

That requires a module handle for the EXE, right? How do you get that 
handle?

Out of curiosity: How come that the hModule is the start address of
the image? On what Windows versions does that work? Is that documented?

Regards,
Martin


More information about the Python-Dev mailing list