[python-win32] testing windows services
Thomas Heller
theller at python.net
Tue Jul 5 16:54:29 CEST 2005
Harald Armin Massa <haraldarminmassa at gmail.com> writes:
> Hello,
>
> within the win32-extensions under demo I found the pipetestservice.py and am
> developping my own services out of it.
>
> With each development step I have to
>
> stop the running service
> remove the existing one
> install the new one
> start the service
AFAIK, if you simply change some code in your service, there's no need
to remove and install it again (unless you change code that is registerd
with windows - the service name or such stuff).
>
> of course, I can script that... but it still takes time.
>
> Is there something quicker? a "fake service environment" in pure python or
> that like?
I think you can start the service like this:
pipetestservice.py debug
An additional advantage is that you can see printouts from the service
on the console, without even using the trace collector tool:
c:\Python23\Lib\site-packages\win32\Demos\service>pipeTestService.py debug
Debugging service PyPipeTestService - press Ctrl+C to stop.
Info 0x40001002 - The PyPipeTestService service has started.
(here I hit ^C)
Stopping debug service.
Info 0x40001004 - The PyPipeTestService service has stopped after processing 0 connections.
c:\Python23\Lib\site-packages\win32\Demos\service>
Thomas
More information about the Python-win32
mailing list