Suppress print to console

50 views
Skip to first unread message

Osian Dafydd Roberts

unread,
Mar 12, 2018, 8:49:22 AM3/12/18
to RSGISLib Support
Hi everyone,

Is there an easy way to prevent rsgislib from printing messages to the console/bash shell? Perhaps by diverting the output to os.devnull?

I would like to suppress the output of imageutils.popImageStats amongst other things.

Thank you, Osian.

Thiago Sanna Freire Silva

unread,
Jan 31, 2019, 7:48:51 AM1/31/19
to RSGISLib Support
Bringing this question back up since I'd like to do it as well. Usual ways of doing it in Python don't work, probably because the printed output is actually coming from an internal gdal call, and not from Python itself. The function I'd like to quieten, in my case, is resampleimage2match.

Thanks.

Thiago

Daniel Clewley

unread,
Mar 22, 2019, 4:11:24 AM3/22/19
to Thiago Sanna Freire Silva, RSGISLib Support
Hi Thiago,

The short answer is there isn’t an easy way to do this. Most of the core code in RSGISLib is C++ and status messages are written to stdout. Updating to use logfiles is something we have discussed but it would require rewriting large sections of code unless we end up with a lot of time to work on this or someone else wants to tackle it it isn’t likely to happen any time soon.

Thanks,

Dan

--
You received this message because you are subscribed to the Google Groups "RSGISLib Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rsgislib-suppo...@googlegroups.com.
To post to this group, send email to rsgislib...@googlegroups.com.
Visit this group at https://groups.google.com/group/rsgislib-support.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages