Checks if terminal is legacy (limited rendering, flicker-prone on rapid redraws, etc.). On Windows, returns True if CMD or PowerShell ISE not hosted in modern shell. On *nix systems, returns True if env.TERM is 'dumb' or 'unknown' (indicating a very basic terminal).
pip install is-legacy-terminalis-legacy-terminal # or islegacy
# e.g. => TrueCLI options:
| Option | Description |
|---|---|
-h, --help |
Show help screen |
-v, --version |
Show version |
--docs |
Open docs URL |
import is_legacy_terminal
if is_legacy_terminal():
print('Is legacy terminal!')
else:
print('Is modern terminal!')Note: Most type checkers will falsely warn is_legacy_terminal is not a callable module because they are incapable of analyzing runtime behavior (where the module is replaced w/ a function for cleaner, direct access). You can safely suppress such warnings using # type: ignore.
Copyright © 2026 Adam Lui
🈶 is-unicode-supported - Detect whether the terminal supports advanced Unicode.


