I would like to capture or show GDAL error messages in an interactive
Python shell. For instance, if trying to open an non-existing raster:
from osgeo import gdal
ds = gdal.Open('noexist.tif')
shows nothing in an interactive shell (PythonWin, IDLE), but shows
messages when used in a shell (cmd.exe or Bash):
ERROR 4: `noexist.tif' does not exist in the file system, and is not
recognised as a supported dataset name.
It appears this output is sent to stderr. How can this output also
appear in an interactive Python shell, such as PythonWin or IDLE?
Thanks,
-Mike
_______________________________________________
gdal-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev