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 Py

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

2012-06-22 Thread Harald Armin Massa[legacy]
Matt, > > Yeah, that was exactly my problem; I had no way to diagnose what was going > on, and >needed a springboard to tell me what I needed to know in order to > figure out what was >happening (or not).  I could verify that the script > *worked*, since I could run it from a DOS >prompt withou

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

2012-06-22 Thread Tim Golden
> Yeah, that was exactly my problem; I had no way to diagnose what was > going on, and needed a springboard to tell me what I needed to know > in order to figure out what was happening (or not). I could verify > that the script *worked*, since I could run it from a DOS prompt > without errors. Bu

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

2012-06-22 Thread Mark Hammond
Services are pretty tricky - you might be better off arranging for the Python script to write sys.stderr somewhere useful and seeing what the traceback says - you'll almost certainly strike the same problem after you get a pywin32 based one close to working. Mark On 22/06/2012 9:19 PM, Funke,

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 resi

Re: [python-win32] How to create a empty com object

2012-06-22 Thread Matteo Boscolo
Hi all , Today I weak up and just came back to my code .. I finally got a good solution for this problem : and here it is ... ..activeComponent=VARIANT(pythoncom.VT_VARIANT | pythoncom.VT_NULL,None) regards, Matteo Il 20/02/2011 23:24, Mark Hammond ha scritto: On 21/02/2011 7:42 AM,

Re: [python-win32] How to create a empty com object

2012-06-22 Thread Matteo Boscolo
Hi all , Today I weak up and just came back to my code .. I finally got a good solution for this problem : and here it is ... ..activeComponent=VARIANT(pythoncom.VT_VARIANT | pythoncom.VT_NULL,None) regards, Matteo Il 20/02/2011 23:24, Mark Hammond ha scritto: On 21/02/2011 7:42 AM

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 _

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

2012-06-22 Thread python
>> For reference, this is the kind of pattern I use when writing Windows >> Services in Python: > This is incredibly useful. Thank you. +1 Malcolm ___ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win

Re: [python-win32] Python implementations on Windows 8rt

2012-06-22 Thread Chris Lambacher
On Wed, Jun 20, 2012 at 12:37 PM, Tim Roberts wrote: > Chris Lambacher wrote: > > Microsoft has stated that only . NET apps will run on Windows on ARM > > so you will likely need to use IronPython if you want to use Python on > > Windows on Arm. > > That's not correct. The .NET Framework will NO

Re: [python-win32] Getting output parameters from stored procedures

2012-06-22 Thread Chris Lambacher
On Wed, Jun 20, 2012 at 10:50 AM, Michael Manfre wrote: > The observed behavior is equivalent to this bit of SQL. > > DECLARE @retval int, @someOut int >> exec @retval = uspReturnsAResultSetOrTwo @someOut OUTPUT >> SELECT @retval, @someOut >> > > I haven't been able to find any documentation stat

Re: [python-win32] Getting output parameters from stored procedures

2012-06-22 Thread Michael Manfre
I was approaching the conclusion that this is expected behavior. Glad to have it confirmed with a reasonable explanation why. I guess the fix will be to document the behavior. Thanks, Michael Manfre On Fri, Jun 22, 2012 at 11:38 PM, Chris Lambacher wrote: > > > On Wed, Jun 20, 2012 at 10:50 AM,