At Friday 9/9/2005 11:08, you wrote:

>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.

Try this:

import os,sys
print os.path.join(
     os.path.dirname(
       os.path.abspath(
         sys.argv[0])),
     'svc.cfg')



Gabriel Genellina
Softlab SRL 

_______________________________________________
Python-win32 mailing list
Python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to