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)

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to