Multithreading support for *win32* BaseHTTPServer

Scherer, Bill Bill.Scherer at VerizonWireless.com
Wed Aug 29 07:11:23 EDT 2001


I guess I should have mentioned that that code doesn't work in
Python 2.1.   It does however work in 1.5.2 or 2.1.1...  All of
the preceding applies only to Linux AFAIK, but the error you
posted looks strikingly similar to what I get when trying to run
that code under 2.1.  I suspect a bug, but 2.1.1 is out, so....


On Wed, 29 Aug 2001, Gerson Kurz wrote:

> On Tue, 28 Aug 2001 08:03:53 -0400 (EDT), "Scherer, Bill"
> <Bill.Scherer at VerizonWireless.com> wrote:
>
> >
> >Try the following:
> > [Source Snipped]
>
> Neither your example nor the ones posted by the other folks seems to
> work on Win32 (more specifically: ActivePython 2.1.0.210, Windows 2000
> SP2) I get this for your example:
>
> D:\Python21\Lib>testmtserver.py
> serving on port 9999
> Exception in thread Thread-1:
> Traceback (most recent call last):
>   File "D:\Python21\Lib\threading.py", line 378, in __bootstrap
>     self.run()
>   File "D:\Python21\Lib\threading.py", line 366, in run
>     apply(self.__target, self.__args, self.__kwargs)
>   File "D:\Python21\Lib\SocketServer.py", line 246, in finish_request
>     self.RequestHandlerClass(request, client_address, self)
>   File "D:\Python21\Lib\SocketServer.py", line 495, in __init__
>     self.handle()
>   File "D:\Python21\Lib\BaseHTTPServer.py", line 258, in handle
>     self.raw_requestline = self.rfile.readline()
>   File "D:\Python21\Lib\socket.py", line 233, in readline
>     new = self._sock.recv(self._rbufsize)
> AttributeError: 'int' object has no attribute 'recv'
>
> and a similar error message for the other two examples :(
>
>

-- 
Bill.Scherer at Verizon Wireless
RHCE 807101044903581





More information about the Python-list mailing list