Skip to content

[BUG] legacy_windows is True when is_terminal is False #3647

Open
@xymy

Description

@xymy

Describe the bug

The console object's legacy_windows is True when is_terminal is False. I think this is a bug, because it's unable to successfully calling Windows console API on non-terminal environment.

# foo.py
from rich.console import Console

console = Console()
print(console.legacy_windows)
> python foo.py 
False
> python foo.py | echo
True

Platform

I use terminal in VS Code on Windows 10.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions