Re: [python-win32] How to invoke Python program from Windows service?

2012-06-22 Thread Funke, Matt
Note you can write the service directly in Python using pywin32. If you want to write the service using some other technology and just spawn Python, then I'd suggest using just CreateProcess. But with both CreateProcess and ProcessStartInfo, you need a way to redirect output from the Python

Re: [python-win32] How to invoke Python program from Windows service?

2012-06-22 Thread Funke, Matt
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

Re: [python-win32] How to invoke Python program from Windows service?

2012-06-22 Thread Funke, Matt
For reference, this is the kind of pattern I use when writing Windows Services in Python: This is incredibly useful. Thank you. Matt Funke Programmer/Analyst Vishay Precision Group, Inc. 951 Wendell Blvd Wendell, NC 27591 USA Office: 919-374-5553 Mobile: 919-628-9261 Fax: 919-374-5248

[python-win32] How to invoke Python program from Windows service?

2012-06-21 Thread Funke, Matt
I'm relatively new to the world of Windows programming, but I have a Python program I'd like to run every once in a while from a Windows service. I've gotten the service itself to run as it's supposed to, but attempts to run the program with a DOS command (using ProcessStartInfo) are