[python-win32] Runnin Python app as service with separate console

Waldemar Osuch waldemar.osuch at gmail.com
Wed Apr 5 21:20:03 CEST 2006


> Morgan, Byron wrote:
> > I have a robust, stable Python script that runs 24-7, crunching a telnet
> > feed of real-time data. Problem is, it has to run in a dos console
> > window on the desktop. I would like to run it as a service, and be able
> > connect to it and monitor performance with a separate console (either
> > gui or not) from time to time. I'm hoping for advice on how to proceed.

Plenty of advice.
Here is my 2 cents.
For last couple of years I run a windows service based on Twisted framework.
One of the almost build in features of the framework is that you can
telnet to the live running service, check the status or even tweak it
while it runs.
The framework handles multitude of protocols as a client and a server
and TELNET is included.
My service even utilizes built in web server to show the status of the
running application.
Although it is not obvious from Twisted documentation it is trivial to
run an application as a windows service as long as you use *.tac files
to build it.

Waldemar


More information about the Python-win32 mailing list