TCP server as a Windows service using Python?

Shalabh Chaturvedi shalabh at
Sat Jan 31 02:26:17 CET 2004

David Mitchell <djmitchell at> wrote in message news:<pan.2004. at>...
> Hello group,
> I'm trying to create a TCP server using Python, and I want it to run under
> Windows as a service.
> I can't see how to let the service accept *either* an incoming TCP client
> connection *or* an e.g. "stop service" message.  If someone could point me
> to some sample code, I'd greatly appreciate it - Google hasn't been
> helpful.

An alternative solution might be to split the functionality into two
processes. The Windows service launches a second (TCP server) process,
which it later kills upon being asked to stop.


More information about the Python-list mailing list