_socket.so source?

mbarry mike.barry at gmail.com
Wed Feb 18 09:23:43 EST 2009


On Feb 17, 6:47 pm, Christian Heimes <li... at cheimes.de> wrote:
> mbarry schrieb:
>
> > Hello,
>
> > The socket module in Python uses_socket.so for most of its behavior.
> > I want to modify the code that generates the_socket.so file.
> > I need the source file and instructions on how tocompileand build
> >_socket.so for Windows.
> > Can anyone point me to where I can find the source and/or
> > documentation for compiling a python shared object on Windows?
>
> You need the Python source tree (download the .tar.gz) and the correct
> compiler in order to build a .dll / .pyd file on Windows. For Python 2.4
> and 2.5 you need Visual Studio 2003 (VC7.1), for Python 2.6 and 3.0 you
> have to install Visual Studio 2008 (VC9).
>
> The code for the_socketextension is in the Modules/ subdirectory of
> the source tree.
>
> Christian

Thanks that was very helpful.  I was browsing the source tree and
found socketmodule.c which I assume is the source for _socket.pyd.  I
also found http://docs.python.org/extending/windows.html which is some
documentation for building python extensions in windows.  The _socket
module is a bit different as there seems to be code imported from the
dll as well as having code written in python in socket.py.  Also the
naming convention is different with the socket module as well.

Thanks
-Mike




Thanks
-Mike



More information about the Python-list mailing list