Module servicemanager

A module that interfaces with the Windows Service Control Manager. While this module can be imported by regular Python programs, it is only useful when used by a Python program hosting a service - and even then is generally used automatically by the Python Service framework. See the pipeTestService sample for an example of using this module.
The module win32service and win32serviceutil provide other facilities for controlling and managing services.

Methods

CoInitializeEx
 

CoUninitialize
 

RegisterServiceCtrlHandler
Registers a function to retrieve service control notification messages. 

LogMsg
Write an specific message to the log. 

LogInfoMsg
Write an informational message to the log. 

LogErrorMsg
Write an error message to the log. 

LogWarningMsg
Logs a generic warning message to the event log 

PumpWaitingMessages
Pumps waiting window messages for the service. 

Debugging
Indicates if the service is running in debug mode. 

StartServiceCtrlDispatcher
Starts the service by calling the win32 StartServiceCtrlDispatcher function. 

Initialize
 

Finalize
 

PrepareToHostSingle
 

PrepareToHostMultiple
 

RunningAsService
Indicates if the code is running as a service. 

SetEventSourceName
Sets the event source name for event log entries written by the service.