[Python-Dev] Re: buildin vs. shared modules

Thomas Heller theller at python.net
Wed Oct 22 03:31:31 EDT 2003


[Thomas]
>>> After installing MSVC6 on a win98 machine, where I could rename
>>> wsock32.dll away (which was not possible on XP due to file system
>>> protection), I was able to change socketmodule.c to use delay loading of
>>> the winsock dll.  I had to wrap up the WSAStartup() call inside a 
>>> __try {} __except {} block to catch the exception thrown.
>>> 
>>> With this change, _socket (and maybe also select) could then also be
>>> converted into builtin modules.
>>> 
>>> Guido, what do you think?
>>
[Guido]
>> I think now is a good time to try this in 2.4.  I don't think I'd want
>> to do this (or any of the proposed reorgs) in 2.3 though.
>
[Paul]
> One (very mild) point - this is highly MSVC-specific. I don't know if
> there is ever going to be any interest in (for example) getting Python
> to build with Mingw/gcc on Windows, but there's no equivalent of this
> in Mingw (indeed, Mingw doesn't, as far as I know, support
> __try/__except either).

The whole delayload/__try/__except stuff may be unneeded in 2.4, because
it will most probably be compiled with MSVC7.1, installed via an msi
installer, and all systems where the msi actually could be installed
would already have a winsock (or winsock2) dll.  At least that is my
impression on what I hear about systems older than (or including?)
win98SE these days.

Thomas




More information about the Python-Dev mailing list