> 📟 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.
Metadata
Release files for is-legacy-terminal 1.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| is_legacy_terminal-1.1.1.tar.gz | 16.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| is_legacy_terminal-1.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 35.6 kB
Release files / is_legacy_terminal-1.1.1.tar.gz
| Download URL | is_legacy_terminal-1.1.1.tar.gz |
|---|---|
| Size | 16.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f00cfaff0ef5ca81cb09829b717b2598f8abfa0c840b3b31a5e47cd0076c540b
|
|
BLAKE2b-256 checksum How to use checksums |
5778db7c4b37922956bb66015c023ddd61f1eab2e894a1eebc5697355a9716ed
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.2
|
Release files / is_legacy_terminal-1.1.1-py3-none-any.whl
| Download URL | is_legacy_terminal-1.1.1-py3-none-any.whl |
|---|---|
| Size | 18.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4bbfc9c42cd45698ff2ab8b157c5c8709c5e01395fb9ca99d84c2a989f11582b
|
|
BLAKE2b-256 checksum How to use checksums |
6fcf5d8fdd6c9d03b8d394e9f21953213b8cbae76bbb5739a4d84e35e2d2e05a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.2
|