# cherrypy.process.win32 module

Windows service.

Requires pywin32.

class cherrypy.process.win32.ConsoleCtrlHandler(bus)

  Bases: `SimplePlugin`

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

  handle(event)

    Handle console control events (like Ctrl-C).

  start()
  stop()

class cherrypy.process.win32.PyWebService(*args: Any, **kwargs: Any)

  Bases: `ServiceFramework`

  Python Web Service.

  SvcDoRun()
  SvcOther(control)
  SvcStop()
  _exe_args_ = None
  _exe_name_ = 'pywebsvc'
  _svc_deps_ = None
  _svc_description_ = 'Python Web Service'
  _svc_display_name_ = 'Python Web Service'
  _svc_name_ = 'Python Web Service'

class cherrypy.process.win32.Win32Bus

  Bases: `Bus`

  A Web Site Process Bus implementation for Win32.

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

  _get_state_event(state)

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

  property state
  wait(state, interval=0.1, channel=None)

    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

  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
      10
      control_codes['graceful'] = 128 + 10

  key_for(obj)

    For the given value, return its corresponding key.

cherrypy.process.win32.signal_child(service, command)