Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
2 tasks done
xymy opened this issue Mar 2, 2025 · 2 comments · May be fixed by #3648
Open
2 tasks done

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

xymy opened this issue Mar 2, 2025 · 2 comments · May be fixed by #3648

Comments

@xymy
Copy link
Contributor

xymy commented Mar 2, 2025

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.

Copy link

github-actions bot commented Mar 2, 2025

Thank you for your issue. Give us a little time to review it.

PS. You might want to check the FAQ if you haven't done so already.

This is an automated reply, generated by FAQtory

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
@xymy and others