Skip to content

Instantly share code, notes, and snippets.

View vadv's full-sized avatar
🏠
Working from home

vadv vadv

🏠
Working from home
  • OZON
  • Moscow
View GitHub Profile
@vadv
vadv / config.py
Created February 10, 2016 19:17 — forked from mgrandi/config.py
Example Windows Service, written using asyncio and frozen using cx_Freeze
# for NAME and DISPLAY_NAME, the '%s' is replaced whatever you pass to <service.exe> --install NAMEHERE, so you can
# register the same exe multiple times with different names and configuration files
NAME = 'cx_FreezeSampleService%s' # what the name of the service is, used in command line things like "sc"
DISPLAY_NAME = 'cx_Freeze Sample Service - %s' # display name of the service, this is what you see in the "Services" window
MODULE_NAME = 'service' # python file containing the actual service code
CLASS_NAME = 'Handler' # class name of the service, since it doesn't extend anything, all it needs are certain methods
DESCRIPTION = 'Sample service description' # description of the service, seen in the Service Properties window
AUTO_START = False # does the service auto start?
# does the service respond to session changes? Setting this to True and implemnting SessionChanged(sessionId, eventType)