Serve_forever??
Moshe Zadka
moshez at math.huji.ac.il
Mon May 15 14:58:18 EDT 2000
On Mon, 15 May 2000, A[r]TA wrote:
> Hello everybody,
>
> Why doesn't this work??
>
> from SocketServer import *
>
> class request:
> print 'blah'
>
> TCPServer(('127.0.0.1' , 80), request)
> TCPServer.serve_forever()
Should be:
> server=TCPServer(('127.0.0.1' , 80), request)
> server.serve_forever()
TCPServer is a class -- TCPServer(....) returns a TCPServer object, which
has a "serve_forever" method.
--
Moshe Zadka <moshez at math.huji.ac.il>
http://www.oreilly.com/news/prescod_0300.html
http://www.linux.org.il -- we put the penguin in .com
More information about the Python-list
mailing list