Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

README.md

> 📟 is-legacy-terminal

Detect whether the terminal is legacy.

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).

⚡ Installation

pip install is-legacy-terminal

💻 Command line usage

is-legacy-terminal  # or islegacy
# e.g. => True

CLI options:

Option Description
-h, --help Show help screen
-v, --version Show version
--docs Open docs URL

🔌 API usage

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.


MIT License

Copyright © 2026 Adam Lui


Related

🈶 is-unicode-supported - Detect whether the terminal supports advanced Unicode.

More Python utilities / Discuss / Report bug / Report vulnerability / Back to top ↑