Skip to main content

better-clear

Clear the terminal screen from Python without spawning a subprocess.

import better_clear

better_clear.clear()                  # clear the screen and scrollback
better_clear.clear(scrollback=False)  # keep the scrollback

Unlike os.system("clear"), it doesn't start a shell, doesn't depend on clear/cls being on PATH, and does nothing when stdout is redirected, so it never writes escape codes into files or pipes.

It's a small Rust extension built with PyO3 and crossterm, which writes ANSI escape codes on Unix and modern Windows terminals and falls back to the Win32 console API on legacy Windows consoles.

yes this is written with claude

Metadata

Release files for better-clear 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for better-clear 0.1.0
File Size Uploaded
better_clear-0.1.0.tar.gz 16.7 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for better-clear 0.1.0
File Interpreter ABI Platform
better_clear-0.1.0-cp39-abi3-win_amd64.whl CPython 3.9 abi3 Windows x86-64 Details
better_clear-0.1.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.9 abi3 Linux glibc 2.17+ x86-64 Details
better_clear-0.1.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.9 abi3 Linux glibc 2.17+ ARM64 Details

Total release size: 1.1 MB

Release files / better_clear-0.1.0.tar.gz

Download URL better_clear-0.1.0.tar.gz
Size 16.7 kB
Tags Source
SHA-256 checksum
How to use checksums
af25cb009e6afd1465d197c264492cb6acb53ce9954fb7ccbce59354510b1fb1
BLAKE2b-256 checksum
How to use checksums
53a1d6bd2fa719745f84695cbd4bb1af3ac4c8ea0f388065670a5ea7ff25ec45
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ultramarine Linux","version":"44","id":"flyingfish","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / better_clear-0.1.0-cp39-abi3-win_amd64.whl

Download URL better_clear-0.1.0-cp39-abi3-win_amd64.whl
Size 617.6 kB
Tags CPython 3.9 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
409e2e2b8ff3c4bde6d4884113c2e6569c92ddadc89cb85fb22b4d25cc7126e3
BLAKE2b-256 checksum
How to use checksums
4935ad752e1348ca332de2701cbfb9f7bdbf6ba35612887a99c1b29ce76176b5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ultramarine Linux","version":"44","id":"flyingfish","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / better_clear-0.1.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL better_clear-0.1.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 228.9 kB
Tags CPython 3.9 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
2b6ef973cf9bbd3ff76fe16985e88740d42c7dbeb1761ff2760ab4896167f2a8
BLAKE2b-256 checksum
How to use checksums
ae22213605c89d83253cec4beec9f734f74ec592b293106a1e72e5ff51e993af
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ultramarine Linux","version":"44","id":"flyingfish","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / better_clear-0.1.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL better_clear-0.1.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 222.0 kB
Tags CPython 3.9 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
be76661c4556259277787269a9fd06b0e4c7b7a28ce56d9b67091282f463c228
BLAKE2b-256 checksum
How to use checksums
6c3c7e9c458778fc63e862aedde8829040de9c1f25d87dbcf3e97230cd69397b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ultramarine Linux","version":"44","id":"flyingfish","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

0.1.1

4 release files

This release

0.1.0 This release

4 release files

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