version-number dependency in extensions (was Re: ConfigParser module in 1.52 is buggy?)

Neil Hodgson nhodgson at bigpond.net.au
Fri Jun 1 04:48:52 CEST 2001


Gordon McMillan:
> You can do it right now (in an exe loading Python) by using
> GetProcAddress(), but it's a pain. If a pyd could figure out what
> pythonxx.dll is in the process that loaded it, and had a map of Python
> versions to PYTHON_API_VERSIONs, I suppose it could do it, too.

   You can work out which pythonxx.dll is in your process by calling
GetModuleHandle("python16")
   to see if python16.dll has been loaded or loop around all the likely or
possible numbers.

   Neil






More information about the Python-list mailing list