Skip to main content

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.

More Python utilities / Back to top ↑

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

is_legacy_terminal-1.1.0.tar.gz (16.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

is_legacy_terminal-1.1.0-py3-none-any.whl (18.9 kB view details)

Uploaded Python 3

File details

Details for the file is_legacy_terminal-1.1.0.tar.gz.

File metadata

  • Download URL: is_legacy_terminal-1.1.0.tar.gz
  • Upload date:
  • Size: 16.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.2

File hashes

Hashes for is_legacy_terminal-1.1.0.tar.gz
Algorithm Hash digest
SHA256 30241e8f798290d9a8ac8dd198d0e26ecda56eb465e2ce263217522c026a5b54
MD5 2e586ce017668dcc164708889832bb55
BLAKE2b-256 0776b801f3219bda3f15f50a87be611cd621d81ee7df49c6b804fe67dc5b3c16

See more details on using hashes here.

File details

Details for the file is_legacy_terminal-1.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for is_legacy_terminal-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0fc2c2352aceb069881ae9bfd588084679226bfaaae57bbbc6d27dd1b63d2aa3
MD5 eef51bb4e2a557c15a9aa35d04f0e325
BLAKE2b-256 ff219c25d0b09685710fff646cea3c7bd1821248dc745df878921dba731b790a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page