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.2.tar.gz (16.6 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.2-py3-none-any.whl (19.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: is_legacy_terminal-1.0.2.tar.gz
  • Upload date:
  • Size: 16.6 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.2.tar.gz
Algorithm Hash digest
SHA256 525f72523244b9845e3e624b72123b422d4e9917fe4dca2d416e1b91472b5d58
MD5 97349821fa000786ef59f8d0ab971b17
BLAKE2b-256 abb934a38071ddc42872b5c5976c53e24dcdb329765aaf8ee6d7c7bf28917173

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for is_legacy_terminal-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e8cae95b18470d17696691a1a456b52f19a19fffc000c2825c45e7bd96fe84f7
MD5 da9470d7996821200ad63376c374bf88
BLAKE2b-256 3c58bd888749338db8008f2daf90364983b994a0885d122c70816b56f1a07d64

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