Module ImportFrom alias ImportFrom alias ImportFrom alias alias ImportFrom alias Import alias Import alias Import alias Import alias ClassDef bases AttributeLoad NameLoad attr body Assign NameStore Str Assign NameStore Str FunctionDef arguments args NameParam defaults vararg body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Str Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad Num Num NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Import alias Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr BinOpMult NameLoad Num NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr TryExcept body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str handlers ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Pass decorator_list FunctionDef arguments args NameParam defaults body Pass decorator_list decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr BoolOpOr NameLoad NameLoad TryExcept body Assign NameStore AttributeLoad SubscriptLoad NameLoad Index AttributeLoad NameLoad attr attr handlers ExceptHandler type NameLoad body ImportFrom alias Assign NameStore NameLoad Assign NameStore SubscriptLoad Call NameLoad Call NameLoad NameLoad Index Num Assign AttributeStore NameLoad attr Call AttributeLoad Str attr NameLoad AttributeLoad NameLoad attr If NameLoad body Expr Call AttributeLoad NameLoad attr Lambda arguments args NameParam defaults NameLoad NameLoad TryExcept body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Expr Call NameLoad Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call NameLoad Str handlers ExceptHandler type NameLoad name NameStore body Expr Call NameLoad Call NameLoad NameLoad decorator_list
N/A __future__ print_function __future__ absolute_import os.path splitext abspath sys modules N/A win32serviceutil N/A win32service N/A win32event N/A win32api Service N/A N/A win32serviceutil ServiceFramework N/A N/A _svc_name_ _unNamed N/A _svc_display_name_ _Service Template __init__ N/A N/A self N/A args N/A N/A N/A N/A N/A win32serviceutil ServiceFramework __init__ self args N/A N/A N/A self log init N/A N/A self stop_event N/A N/A win32event CreateEvent None 0 0 None N/A log N/A N/A self msg N/A N/A N/A servicemanager N/A N/A N/A servicemanager LogInfoMsg N/A str msg N/A sleep N/A N/A self sec N/A N/A N/A N/A N/A win32api Sleep N/A sec 1000 True N/A SvcDoRun N/A N/A self N/A N/A N/A N/A N/A self ReportServiceStatus N/A win32service SERVICE_START_PENDING N/A N/A N/A N/A N/A self ReportServiceStatus N/A win32service SERVICE_RUNNING N/A N/A N/A self log start N/A N/A N/A self start N/A N/A N/A self log wait N/A N/A N/A win32event WaitForSingleObject N/A self stop_event N/A win32event INFINITE N/A N/A N/A self log done N/A N/A N/A Exception N/A err N/A N/A N/A N/A self log N/A N/A Exception: {0} format err N/A N/A N/A self SvcStop N/A SvcStop N/A N/A self N/A N/A N/A N/A N/A self ReportServiceStatus N/A win32service SERVICE_STOP_PENDING N/A N/A N/A self log stopping N/A N/A N/A self stop N/A N/A N/A self log stopped N/A N/A N/A win32event SetEvent N/A self stop_event N/A N/A N/A self ReportServiceStatus N/A win32service SERVICE_STOPPED N/A start N/A N/A self N/A N/A N/A N/A stop N/A N/A self N/A N/A N/A N/A N/A instart N/A N/A cls name display_name stay_alive N/A None True N/A N/A Install and  Start (auto) a Service

    cls : the class (derived from Service) that implement the Service
    name : Service name
    display_name : the name displayed in the service manager
    stay_alive : Service will stop on logout if False
     N/A N/A cls _svc_name_ name N/A N/A cls _svc_display_name_ N/A display_name name N/A N/A N/A module_path N/A N/A modules N/A N/A cls __module__ __file__ N/A N/A N/A AttributeError N/A sys executable N/A module_path executable N/A module_file N/A N/A splitext N/A abspath module_path N/A 0 N/A N/A cls _svc_reg_class_ N/A N/A {0}.{1} format module_file N/A cls __name__ N/A stay_alive N/A N/A N/A N/A win32api SetConsoleCtrlHandler N/A N/A N/A x N/A True True N/A N/A N/A N/A N/A win32serviceutil InstallService N/A cls _svc_reg_class_ N/A cls _svc_name_ N/A cls _svc_display_name_ startType N/A win32service SERVICE_AUTO_START N/A N/A print Install ok N/A N/A N/A win32serviceutil StartService N/A cls _svc_name_ N/A N/A print Start ok N/A N/A N/A Exception N/A err N/A N/A N/A print N/A str err N/A