António,<br><br>Refer to the documentation of python's subprocess module.<br><a href="http://www.python.org/doc//current/library/subprocess.html">http://www.python.org/doc//current/library/subprocess.html</a><br><br><div class="gmail_quote">
2011/7/12 António Rocha <span dir="ltr"><<a href="mailto:antonio.rocha@deimos.com.pt">antonio.rocha@deimos.com.pt</a>></span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Greetings<br>
<br>
In a Python script I'm using this to run an external BIN:<br>
p=subprocess.call(command) where command is my command to run the bin. p will be equal tot he return values of the bin.<br>
(so far so good)<br>
But I'm getting an error now while running bin:<br>
File "C:/EIS/scripts/mycopy", line 577, in<br>
<module><br>
main()<br>
File "C:/EIS/scripts/mycopy", line 278, in main<br>
p=subprocess.call(command)<br>
File "C:\EIS\Python25\lib\<u></u>subprocess.py", line 444, in<br>
call<br>
return Popen(*popenargs, **kwargs).wait()<br>
File "C:\EIS\Python25\lib\<u></u>subprocess.py", line 594, in<br>
__init__<br>
errread, errwrite)<br>
File "C:\EIS\Python25\lib\<u></u>subprocess.py", line 816, in<br>
_execute_child<br>
startupinfo)<br>
WindowsError: [Error 193]<br>
<br>
My problem is not the error but, is there a way to "get" the error and stop the process in a more smoother way instead of stopping so drastically?<br>
<br>
Thanks<br>
Antonio<br>
<br>
<br>
__________ Information from ESET NOD32 Antivirus, version of virus signature database 6286 (20110712) __________<br>
<br>
The message was checked by ESET NOD32 Antivirus.<br>
<br>
<a href="http://www.eset.com" target="_blank">http://www.eset.com</a><br>
<br>
<br>
______________________________<u></u>_________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/<u></u>mailman/listinfo/gdal-dev</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>Best regards,<br>Chaitanya kumar CH.<br><br>+91-9494447584<br>17.2416N 80.1426E<br>