open-research / sumatra

http://neuralensemble.org/sumatra/
BSD 2-Clause "Simplified" License
127 stars 48 forks source link

Enh: Add launch mode with a pass-through option for stderr #398

Open alcrene opened 7 months ago

alcrene commented 7 months ago

The motivation for this was to allow using tqdm progress bars in my scripts, since those use stderr to display progress. I imagine this might be useful in other situations as well, including other progress bar libraries.

This option to leave stderr as-is is propagated through a new stderr keyword argument to run().

To use this option, I added a new launch mode is called SerialTqdmLaunchMode, which uses this new argument to disable stderr capture. Arguably a more generic may be more correct, but for now I went with this because

On the flip side, there may be an advantage to being explicit that stderr will not be captured with this launch mode. All that to say that I’m far from wedded to this name.