[python-win32] How to invoke Python program from Windows service?
Funke, Matt
Matt.funke at vishaypg.com
Fri Jun 22 14:59:35 CEST 2012
> From my experiences with Python windows services some things to lookout for:
>
> - the "working directory" of the service is usually where the service control
> programm resides; especially NOT your Python directory
>
> - the path is usually the system path. It is not uncommon that Python resides
> in a different path
>
> - network drives are often not mapped for services, so make sure to use
> UNC-paths
>
> - some windows-system-dlls may have the same name as some of your
> python-programm files (or, even worse, as some of the Python files of any
> one of standard library or your used libraries). Windows usually looks first
> into the current directory ... which may have unexpected results when
> "import xxxx" loads xxxx.dll from windows, instead of your xxxx.py
Thanks for the heads-up. If I run into some "unexpected results", I'll be sure to try these things first.
More information about the python-win32
mailing list