En Sat, 06 Feb 2010 21:24:33 -0300, News123 <news...@free.fr> escribió:
Gabriel Genellina wrote:
En Fri, 05 Feb 2010 20:03:51 -0300, News123 <news...@free.fr> escribió:

I'm using an XMLRPC server under Windows.
What I wonder is how I could create a server, that can be killed with
CTRL-C

Python 2.6 and up behaves exactly as you want.
On previous versions you may use this:

        def server_bind(self):
            self.socket.settimeout(1.0)
            SimpleXMLRPCServer.SimpleXMLRPCServer.server_bind(self)


Overloading  server_bind() with your version solved my problem.

Strange. With Python 2.6.4 I don't need to do that; I'd say the difference is in the OS or antivirus (some AV are known to break the TCP stack).

--
Gabriel Genellina

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to