[python-win32] handling paths in windows services

Jason jason.mule at gmail.com
Fri Sep 9 16:08:19 CEST 2005


I get the following error when trying to run a python script as a service

The instance's SvcRun() method failed 
  File "win32serviceutil.pyc", line 742, in SvcRun
  File "winService.pyc", line 134, in SvcDoRun
  File "winService.pyc", line 83, in RunMe
  File "config.pyc", line 28, in readConfig
exceptions.IOError: (2, 'No such file or directory', 'svc.cfg')

The 'svc.cfg' is on the the same directory that contains the python
script, but its path is obviously not available to the windows
service. Short of using absolute paths, what would be the correct way
to handle this.

Thank you


More information about the Python-win32 mailing list