Commits

Anthony Tuininga committed c6e96e1

Added additional documentation on how to run Windows services as requested.

Comments (0)

Files changed (2)

samples/service/ServiceHandler.py

 
 This sample makes use of cx_PyGenLib (http://cx-pygenlib.sourceforge.net) and
 cx_Logging (http://cx-logging.sourceforge.net).
+
+See below for more information on what methods must be implemented and how they
+are called.
 """
 
 import cx_Logging
         cx_Logging.Info("initializing: config file name is %r", configFileName)
 
     # called when the service is starting immediately after Initialize()
+    # use this to perform the work of the service; don't forget to set or check
+    # for the stop event or the service GUI will not respond to requests to
+    # stop the service
     def Run(self):
         cx_Logging.Info("running service....")
         self.stopEvent.Wait()

samples/service/setup.py

 # A simple setup script for creating a Windows service. See the comments in the
 # Config.py and ServiceHandler.py files for more information on how to set this
 # up.
+#
+# Installing the service is done with the option --install <Name> and
+# uninstalling the service is done with the option --uninstall <Name>. The
+# value for <Name> is intended to differentiate between different invocations
+# of the same service code -- for example for accessing different databases or
+# using different configuration files.
 
 from cx_Freeze import setup, Executable