Creating C modules for Python under Cygwin

Alex Martelli aleax at aleax.it
Mon May 6 06:24:02 EDT 2002


Martin v. Löwis wrote:

> Alex Martelli <aleax at aleax.it> writes:
> 
>> That has nothing to do with the DLL - vs - EXE choice, as far as I can
>> see, and everything to do with the choice of NAME for the executable
>> module you package Python's functionality into.  If you named the EXE
>> PYTHON22.EXE and so on, you'd be "forcing extensions module" just as
>> much; vice versa, if you named the DLL PYTHON.DLL you would not be
>> forcing those modules to commit.  It's not about the extension:-),
>> it's about the filename.
> 
> Right. However, I believe that the DLL name contains the Python
> version so that multiple simultaneous Python installations are
> possible, especially when the Python DLL is put into the system
> directory.

You can put only one Python.DLL into a system directory, sure, but
there should be no problem having multiple Python installations
anyway, as long as each Python.EXE had its own Python.DLL in the
_same_ directory -- according to the MS docs, that should have
priority (can't test on every Windows variant, of course:-0).


> With python.exe, this would not be that much of a problem: there is no
> additional file (a pythonxy.dll) to be loaded that must match the
> version of the executable; all extensions would then be subject to the
> PYTHON_API_VERSION check.

Of course, API version checking would be needed in all cases, even
if we switched to naming both EXE and DLL Python.* -- all I'm saying
is that tying extensions to specific Python versions _might_ be just
as avoidable with DLLs as with EXEs, even with multiple installations
of Python on the same Windows machine... said multiple installs just
wouldn't be able to copy all python.DLL's into the system directory.


Alex




More information about the Python-list mailing list