Skip to main content

vtclear

vtclear banner

Python ANSI VT100 implementation of Erase Screen

CI PyPI version Python versions License: MIT DeepWiki

installation

uv add vtclear

or

pip install vtclear

usage

from vtclear import clear_screen
clear_screen()

The escape sequence itself is exported too, in case you want to write it somewhere other than stdout:

import sys
from vtclear import CLEAR_SCREEN
sys.stderr.write(CLEAR_SCREEN)
sys.stderr.flush()  # no newline in the sequence, so flush by hand

notes

Any VT100 compatible terminal reads the sequence, Windows Terminal included: it has been the default host on Windows 11 since 22H2. The exception is the classic console host, conhost.exe, still the default on Windows 10, where virtual terminal processing stays off unless something turns it on and CPython does not. There the sequence is printed verbatim instead of clearing, and enabling it is the caller's job, e.g. through colorama.just_fix_windows_console().

license

This project is licensed under the MIT License.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vtclear-1.0.3.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

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

vtclear-1.0.3-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file vtclear-1.0.3.tar.gz.

File metadata

  • Download URL: vtclear-1.0.3.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for vtclear-1.0.3.tar.gz
Algorithm Hash digest
SHA256 dca24c696a94e1d5f298b596bb688af5ed7c48696c5df6189c3b5f29d8dc3050
MD5 132c94ffeec504850e51fb410668e163
BLAKE2b-256 03982dd7424e47ecf9d85b3d0e92edb16572fb96aacd9f8ed4c18b2758c3735e

See more details on using hashes here.

File details

Details for the file vtclear-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: vtclear-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 3.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for vtclear-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 1324d18261c3906f7b83298259dd42d475cf4c5568503f89feea05d478d818af
MD5 27f2dae99e280e19badc87ecee0d32d2
BLAKE2b-256 ff886b944a6784ca7fb4043e5ca9c06e887578eadcf7ca22074c0286fec0a8f0

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.0.3 This release

2 files

1.0.2

2 files

1.0.1

2 files

1.0

1 file

0.9

1 file

0.8

1 file

0.7

1 file

0.4

1 file

0.3

1 file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page