[python-win32] How to determine whether program running asservice?
David Rushby
davidrushby at yahoo.com
Wed Oct 6 19:22:39 CEST 2004
Mark, did you come to any conclusion as to if/how a Python program will
be able to ask "am-I-running-as-a-service" in future versions of
pywin32?
As a reminder, here are some of the proposals discussed on this list in
early September:
--------------------------
A) sys.serviceexecutable - attribute containing the name of the
executable; would only be present if program running as service
--------------------------
B) servicemanager.is_service - boolean
servicemanager.is_debugging - boolean
--------------------------
C) servicemanager.RunningAsService() -> bool
[To match the extant servicemanager.Debugging() -> bool]
--------------------------
Toward the end of the discussion, you agreed that servicemanager,
rather than sys, was the natural location for this functionality, so
that eliminates A.
Your next proposal was B (boolean attributes), which is fine, but I
suggested C (boolean functions) for the sake of symmetry with the
existing function servicemanager.Debugging().
Thanks for your time. Is there anything I can do to help ensure that
this functionality (regardless of the specific API) makes it into the
next release?
__________________________________
Do you Yahoo!?
Yahoo! Mail - You care about security. So do we.
http://promotions.yahoo.com/new_mail
More information about the Python-win32
mailing list