cherrypy.process.win32 module

Windows service. Requires pywin32.

class cherrypy.process.win32.ConsoleCtrlHandler(bus)[source]

Bases: cherrypy.process.plugins.SimplePlugin

A WSPBus plugin for handling Win32 console events (like Ctrl-C).


Handle console control events (like Ctrl-C).

class cherrypy.process.win32.Win32Bus[source]

Bases: cherrypy.process.wspbus.Bus

A Web Site Process Bus implementation for Win32.

Instead of time.sleep, this bus blocks using native win32event objects.


Return a win32event for the given state (creating it if needed).

property state
wait(state, interval=0.1, channel=None)[source]

Wait for the given state(s), KeyboardInterrupt or SystemExit.

Since this class uses native win32event objects, the interval argument is ignored.

class cherrypy.process.win32._ControlCodes[source]

Bases: dict

Control codes used to “signal” a service via ControlService.

User-defined control codes are in the range 128-255. We generally use the standard Python value for the Linux signal and add 128. Example:

>>> signal.SIGUSR1
control_codes['graceful'] = 128 + 10

For the given value, return its corresponding key.

cherrypy.process.win32.signal_child(service, command)[source]