You are absolutely right. I made a mistake. I meant p=subprocess.call(<COMMAND>)<div><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
If you use subprocess.call(), the return value is the return code of<br>
the child process.<br>
<br></blockquote><div>But In this case I obtain this in Command Output window:</div><div><span class="Apple-style-span" style="font-family: 'Times New Roman'; font-size: medium; "><pre>><i> This application has requested the Runtime to terminate it
</i>><i> in an unusual way.
</i>><i> Please contact the application's support team for more
</i>><i> information.</i></pre><pre><i>and my p is 3 (don't know why because in no place of the binary there is any return 3)</i></pre><pre><i>Is it possible to get above text ("This application ..." in a variable?</i></pre>
<pre><i>Thanks</i></pre><pre><i>Jenny</i></pre></span></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
If you use subprocess.Popen(), the .wait() method returns the child<br>
process' return code, which can also be retrieved from the .returncode<br>
attribute of the Popen object.<br>
<br>
Typically, a return code of zero indicates success while a non-zero<br>
value indicates failure. On Unix, a negative value indicates that the<br>
process terminated due to a signal.<br>
<br>
Neither call() nor Popen() raise an exception if the spawned program<br>
"fails" in some sense, only if they are unable to execute the program,<br>
query its status, etc.<br>
<font color="#888888"><br>
--<br>
Glynn Clements <<a href="mailto:glynn@gclements.plus.com">glynn@gclements.plus.com</a>><br>
</font></blockquote></div><br></div>