Description Field in WinXP Services
Roger Upole
rupole at hotmail.com
Sat Jan 29 16:52:53 EST 2005
ChangeServiceConfig2 is the api functions that sets the description,
but it's not in the win32service module (yet).
Roger
"rbt" <rbt at athop1.ath.vt.edu> wrote in message
news:ctgij1$diq$1 at solaris.cc.vt.edu...
> How does one associate a "Description" with a Windows service written in
> Python? I've just started experimenting with Python services. Here's my
> code... copied straight from Mr. Hammond's "Python Programming on Win32":
>
> import win32serviceutil
> import win32service
> import win32event
>
> class test_py_service(win32serviceutil.ServiceFramework):
> _svc_name_ = "test_py_service"
> ## Tried the following to no avail.
> _svc_description_ = "Test written by Brad"
> _svc_display_name_ = "Test Python Service"
>
> def __init__(self, args):
> win32serviceutil.ServiceFramework.__init__(self, args)
> self.hWaitStop = win32event.CreateEvent(None, 0, 0, None)
>
> def SvcStop(self):
> self.ReportServiceStatus(win32service.SERVICE_STOP_PENDING)
> win32event.SetEvent(self.hWaitStop)
>
> def SvcDoRun(self):
> win32event.WaitForSingleObject(self.hWaitStop,
> win32event.INFINITE)
>
>
> if __name__ == '__main__':
> win32serviceutil.HandleCommandLine(test_py_service)
>
----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= East/West-Coast Server Farms - Total Privacy via Encryption =---
More information about the Python-list
mailing list