Enh: Add launch mode with a pass-through option for stderr #398
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 torun()
.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 becauseSerialPassStderrLaunchMode
, it may not be immediately obvious that them that they should use this.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.