vtclear
Python ANSI VT100 implementation of Erase Screen
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dca24c696a94e1d5f298b596bb688af5ed7c48696c5df6189c3b5f29d8dc3050
|
|
| MD5 |
132c94ffeec504850e51fb410668e163
|
|
| BLAKE2b-256 |
03982dd7424e47ecf9d85b3d0e92edb16572fb96aacd9f8ed4c18b2758c3735e
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1324d18261c3906f7b83298259dd42d475cf4c5568503f89feea05d478d818af
|
|
| MD5 |
27f2dae99e280e19badc87ecee0d32d2
|
|
| BLAKE2b-256 |
ff886b944a6784ca7fb4043e5ca9c06e887578eadcf7ca22074c0286fec0a8f0
|