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 not legacy 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.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.0.0-py3-none-any.whl (19.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: is_legacy_terminal-1.0.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.0.0.tar.gz
Algorithm Hash digest
SHA256 5f94c1ea18f8f912161ddd8e458537e55664c6f4670c49a76e6fc29e967d7535
MD5 a10f9ce6f1b9543896339ec7a8fc34fb
BLAKE2b-256 1b1a931c430978c79f0705cbb3120959f210b1efd9a85f9836bb5752ca2cf935

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for is_legacy_terminal-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 01bffd1292c1530433b2a759e68e3a7a1ee6e73221029473d77fcadfc1326674
MD5 5f3dd1eb1cde1bbcf07a0d272df8fb3d
BLAKE2b-256 4a9237dd50b2ebce7331f6dfdb3ef9a67213b774806d6a21dc8d60f3069bde44

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