[GRASS-dev] usage of subprocess.call

António Rocha antonio.rocha at deimos.com.pt
Tue Jul 12 07:42:20 EDT 2011


Greetings

In a Python script I'm using this to run an external BIN:
p=subprocess.call(command) where command is my command to run the bin. p 
will be equal tot he return values of the bin.
(so far so good)
But I'm getting an error now while running bin:
 File "C:/EIS/scripts/mycopy", line 577, in
<module>
   main()
 File "C:/EIS/scripts/mycopy", line 278, in main
   p=subprocess.call(command)
 File "C:\EIS\Python25\lib\subprocess.py", line 444, in
call
   return Popen(*popenargs, **kwargs).wait()
 File "C:\EIS\Python25\lib\subprocess.py", line 594, in
__init__
   errread, errwrite)
 File "C:\EIS\Python25\lib\subprocess.py", line 816, in
_execute_child
   startupinfo)
WindowsError: [Error 193]

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?

Thanks
Antonio




__________ Information from ESET NOD32 Antivirus, version of virus signature database 6286 (20110712) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com




More information about the grass-dev mailing list