<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"><channel><title>bearlog - Latest Comments in getting the exit code from a batch file that is run from a python program</title><link>http://bearlog.disqus.com/</link><description></description><language>en</language><lastBuildDate>Wed, 11 Nov 2009 13:28:45 -0000</lastBuildDate><item><title>Re: getting the exit code from a batch file that is run from a python program</title><link>http://code-bear.com/bearlog/2007/06/01/getting-the-exit-code-from-a-batch-file-that-is-run-from-a-python-program/#comment-22761907</link><description>I suspect it's how NANT is calling the scripts from within it's code that requires the explicit use of the EXIT keyword - a batch-to-batch invocation probably is handled in a subtly different manner (which is what both of us had to find and solve ;)</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">bear</dc:creator><pubDate>Wed, 11 Nov 2009 13:28:45 -0000</pubDate></item><item><title>Re: getting the exit code from a batch file that is run from a python program</title><link>http://code-bear.com/bearlog/2007/06/01/getting-the-exit-code-from-a-batch-file-that-is-run-from-a-python-program/#comment-22721750</link><description>After waiting a lot of time I'm glad I found this trick. I could not figure out why it would return the correct error code to another bat file, but not to NANT.&lt;br&gt;&lt;br&gt;This is what I ended up using for my scripts:&lt;br&gt;&lt;br&gt;GOTO Exit&lt;br&gt;&lt;br&gt;:ResultCode&lt;br&gt;EXIT /B %1&lt;br&gt;&lt;br&gt;:Exit&lt;br&gt;ENDLOCAL &amp; CALL :ResultCode %ERRORLEVEL%</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Scott</dc:creator><pubDate>Wed, 11 Nov 2009 09:53:41 -0000</pubDate></item><item><title>Re: getting the exit code from a batch file that is run from a python program</title><link>http://code-bear.com/bearlog/2007/06/01/getting-the-exit-code-from-a-batch-file-that-is-run-from-a-python-program/#comment-4562192</link><description>Thank you man!</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">מתנפחים</dc:creator><pubDate>Sun, 21 Dec 2008 18:33:33 -0000</pubDate></item><item><title>Re: getting the exit code from a batch file that is run from a python program</title><link>http://code-bear.com/bearlog/2007/06/01/getting-the-exit-code-from-a-batch-file-that-is-run-from-a-python-program/#comment-495134</link><description>Glad to help!  With the amount of time our team took in figuring this one out there was no way I wasn't going to share it :)</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">bear</dc:creator><pubDate>Tue, 20 May 2008 05:23:03 -0000</pubDate></item><item><title>Re: getting the exit code from a batch file that is run from a python program</title><link>http://code-bear.com/bearlog/2007/06/01/getting-the-exit-code-from-a-batch-file-that-is-run-from-a-python-program/#comment-481275</link><description>Excellent!  Many, many thanks for figuring out this technique.  Your post definitely did save me a huge amount of time and effort trying to figure out how to do this.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Steven Knight</dc:creator><pubDate>Fri, 16 May 2008 20:55:15 -0000</pubDate></item></channel></rss>