Package bw :: Package poseidon :: Module PoseidonService :: Class BasicNTService
[frames] | no frames]

Class BasicNTService

win32serviceutil.ServiceFramework --+
                                    |
                           object --+
                                    |
                                   BasicNTService

Abstract base to help out with building NT services
in Python with the win32all(by Mark Hammond) support for
python nt services.

Remember to set the two following class attributes
to something sensible in your subclass
_svc_name_ = 'PyroNS'
_svc_display_name_ = 'Pyro Naming Service NT service'

The following are optional
 _svc_deps_: This should be set to the list of service names
                         That need to be started before this one.
 _exe_name_: This should be set to a service .EXE if you're not
                         going to use PythonService.exe
 _svc_description_ : This is the descriptive string that you find
                                         in the services applet

To register the service with the SCM the easiest way is to include the
following at the bottom of the file where your subclass is defined.
if __name__ == '__main__':
        TheClassYouDerivedFromBasicNTService.HandleCommandLine()

Instance Methods
 
__init__(self, args)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
 
SvcStop(self)
Template method from win32serviceutil.ServiceFramework
 
SvcDoRun(self)
part of Template method SvcRun from win32serviceutil.ServiceFramework
 
logTermination(self)
 
logStarted(self)

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Class Methods
 
CustomOptionHandler(cls, opts)
 
HandleCommandLine(cls)
Properties

Inherited from object: __class__

Method Details

__init__(self, args)
(Constructor)

 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)