On Wed, Sep 5, 2018 at 10:43 AM Markus Neteler <[email protected]> wrote:
>
> Hi,
>
> AFAIK Python buffers (i.e. effectively delays)  stderr output which is
> unhelpful in the GRASS GIS context.
>
> Searching for a solution, I found this reference: sys.stdout.flush()
> e.g.
>
https://stackoverflow.com/questions/10019456/usage-of-sys-stdout-flush-method

That should be
sys.stderr.flush()
right?

Regarding python's multiprocessing, it makes sense that stderr is
suppressed because you would not know which process process produced which
stderr (or stdout) message. There must be a method in python to redirect
stderr and stdout for each process to a unique file, otherwise it would not
be possible to find out why some process failed.

Such a method would need to be implemented in each module usings python's
multiprocessing.

Markus M
_______________________________________________
grass-dev mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/grass-dev

Reply via email to