[pypy-dev] Socket module on windows

Amaury Forgeot d'Arc amauryfa at gmail.com
Mon Apr 16 00:31:32 CEST 2007


Hello,

I finally managed to port the socket module to windows.
It is probably incomplete, but at least it translates, and I prove it:

 > pypy.exe
 debug: WARNING: library path not found, using compiled-in sys.path
 Python 2.4.1 (pypy 1.0.0 build 41908) on win32
 Type "help", "copyright", "credits" or "license" for more information.
 >>>> import socket
 >>>> s = socket.socket()
 >>>> s.connect(('localhost', 80))
 >>>> s.send('GET\n\n')
 5
 >>>> s.recv(100)
 '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"\r\n
 "http://www.w3.org/TR/xhtml1/DTD'
 >>>>

I can send a (rough) patch file to anybody who wants to test it...

Since my svn account is still active, I will carefully submit my
changes step by step, hoping not to break anything: I do not have
access to a Unix machine, so I will closely follow the results of the
nightly tests.

Of course your comments are most welcome... there were some rough
parts and I am sure I took the wrong way sometimes.

Cheers,

-- 
Amaury Forgeot d'Arc



More information about the Pypy-dev mailing list