Skip to content

Redirect both sys.stdout and sys.stderr #422

@DrJimFan

Description

@DrJimFan

I have a function from another library that occasionally prints to both stdout and stderr. I cannot hack the source code of that function.

While the example shows how to redirect sys.stdout inside a tqdm loop, how do I redirect stderr at the same time?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions