Running Python script from C++ code(.NET)

Cameron Laird claird at lairds.us
Tue Sep 26 19:43:27 EDT 2006


In article <1159277151.292508.55360 at i3g2000cwc.googlegroups.com>,
volcano <Mark.Geyzer at gmail.com> wrote:
			.
			.
			.
>But here is another question for gurus: sometimes my script fails, and
>I cannot figure out why. OK, I can - especially since I terminate it
>with "sys.exit()", but I want my app to know too.
>"GetLastError" returns 0 - for the obvious reason that this is the
>value Python interpreter returns with. But how can I get the script
>return value?
>

Your question confuses me.  Do you realize Python can exit with

   sys.exit(0)
or
   sys.exit(1)

for example, to distinguish differenet exit conditions?  When 
you do these, GetLastError() will NOT always yield 0.



More information about the Python-list mailing list