_socket.so source?

M

mbarry

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 to compile and 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?

Thanks
-Mike
 
M

mbarry

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top