_socket.so source?

Discussion in 'Python' started by mbarry, Feb 17, 2009.

  1. mbarry

    mbarry Guest

    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
     
    mbarry, Feb 17, 2009
    #1
    1. Advertising

  2. mbarry

    mbarry Guest

    On Feb 17, 6:47 pm, Christian Heimes <> 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
     
    mbarry, Feb 18, 2009
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Barry Sprajc
    Replies:
    1
    Views:
    392
    Skip Montanaro
    Aug 3, 2003
  2. Arend Sluis

    No model named _socket

    Arend Sluis, Oct 28, 2003, in forum: Python
    Replies:
    2
    Views:
    505
    Arend Sluis
    Oct 28, 2003
  3. Stephen Williams
    Replies:
    2
    Views:
    385
    Dieter Maurer
    May 2, 2004
  4. =?ISO-8859-1?Q?Michael_Str=F6der?=
    Replies:
    3
    Views:
    411
    Dieter Maurer
    Dec 5, 2004
  5. Huzaifa Tapal
    Replies:
    0
    Views:
    421
    Huzaifa Tapal
    Apr 26, 2005
Loading...

Share This Page