[gdal-dev] usage of subprocess.call

Chaitanya kumar CH chaitanya.ch at gmail.com
Tue Jul 12 08:03:56 EDT 2011


António,

Refer to the documentation of python's subprocess module.
http://www.python.org/doc//current/library/subprocess.html

2011/7/12 António Rocha <antonio.rocha at deimos.com.pt>

> 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
>
>
> ______________________________**_________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/**mailman/listinfo/gdal-dev<http://lists.osgeo.org/mailman/listinfo/gdal-dev>
>



-- 
Best regards,
Chaitanya kumar CH.

+91-9494447584
17.2416N 80.1426E
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20110712/0c3c2b28/attachment.html


More information about the gdal-dev mailing list