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 (flicker-prone, limited rendering, 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 islegacyterm
# 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.0.1.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.0.1-py3-none-any.whl (19.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: is_legacy_terminal-1.0.1.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.0.1.tar.gz
Algorithm Hash digest
SHA256 24a3ba7874ce5ee2394cb8ca7e316ce3aa96291b7f5882a14c8a4367115db835
MD5 1a614c8fb1e3182b8e1946c4013993ca
BLAKE2b-256 245d12db7a8fcde8636f76c7bfa88fd586b8fb612acd24822a31973be0fae8f7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for is_legacy_terminal-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c4a7be171ce4165dd8a6e22041fdfdd872c2a5589b3cc8999eed2eeeb8c1796a
MD5 3fc4cd2bbec67495bab4fce8b8bbdcfd
BLAKE2b-256 9120c55ac073ed8f81e2e1f672a085d635439ce4d5b60a87873bdcc42c7cfd48

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