Detect whether the terminal is legacy.
Project description
> 📟 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.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file is_legacy_terminal-1.1.1.tar.gz.
File metadata
- Download URL: is_legacy_terminal-1.1.1.tar.gz
- Upload date:
- Size: 16.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f00cfaff0ef5ca81cb09829b717b2598f8abfa0c840b3b31a5e47cd0076c540b
|
|
| MD5 |
16ea14f92ab544ce85d1f5817fc1261b
|
|
| BLAKE2b-256 |
5778db7c4b37922956bb66015c023ddd61f1eab2e894a1eebc5697355a9716ed
|
File details
Details for the file is_legacy_terminal-1.1.1-py3-none-any.whl.
File metadata
- Download URL: is_legacy_terminal-1.1.1-py3-none-any.whl
- Upload date:
- Size: 18.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4bbfc9c42cd45698ff2ab8b157c5c8709c5e01395fb9ca99d84c2a989f11582b
|
|
| MD5 |
1831360c727b32692a9213fb67f58bd1
|
|
| BLAKE2b-256 |
6fcf5d8fdd6c9d03b8d394e9f21953213b8cbae76bbb5739a4d84e35e2d2e05a
|