temp_text
usage
from time import sleep
import temp_text
for i in range(100):
if i % 10 == 0:
print(f"Found special number: {i}")
temp_text.prnt(f"Looking at {i}")
sleep(0.3)
from time import sleep
from itertools import *
import temp_text
for c in chain.from_iterable(tee("-\\|/", 10)):
temp_text.prnt(c)
sleep(0.3)
import os
import temp_text
for d, _, _ in os.walk("/"):
temp_text.prnt(d)
description
A simple package to allow for text on the terminal which is overwritten by the next call to print.
prnt
Print a temporary string to the console. Must not contain newline characters, because only the line the cursor is currently on is cleared. This function calls hide if there is a temporary string on the console.
If trim_to_width is True (this is the default), then the string has some characters in the middle replaced with ellipsis so it does not span multiple lines.
hide
Clears the line the cursor is currently on if there is a temporary string there.
Hide is also called if the program exits.
use_write_guards
If this setting is True (this is the default) then calling regular print (or any other function that invokes sys.stdout.write or sys.stderr.write) first clears the current line, assuming there is a temporary string there.
import temp_text
temp_text.use_write_guards = False
temp_text.prnt("Hello, World")
# Output: "Hello, World"
print("Hello, World!")
# Output: "Hello, WorldHello, World!"
# If you inserted a temp_text.hide() before the print,
# then the output would be the expected "Hello, World!"
# use_write_guards = True does this automatically
Metadata
Release files for temp-text 2026.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| temp_text-2026.2.1.tar.gz | 3.0 kB | Without provenance | Details for temp_text-2026.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| temp_text-2026.2.1-py3-none-any.whl | Python 3 | none | any | Details for temp_text-2026.2.1-py3-none-any.whl |
Total release size: 6.4 kB
Release files / temp_text-2026.2.1.tar.gz
| Download URL | temp_text-2026.2.1.tar.gz |
|---|---|
| Size | 3.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
70d4481e3b45853c1400855c40a0a865bd1a2f33bc478a59eb12f7f26304fcaf
|
|
BLAKE2b-256 checksum How to use checksums |
567d90b552b35c87b60529792a06aef143e052052d2aabbdb5527de0aff65e69
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Release files / temp_text-2026.2.1-py3-none-any.whl
| Download URL | temp_text-2026.2.1-py3-none-any.whl |
|---|---|
| Size | 3.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9f4a06139fb19e800fd668aed16b581a149d80d9fba1e05a12a4de4dc22af466
|
|
BLAKE2b-256 checksum How to use checksums |
82a9dcb0bd5446fb4cb43774a380f0cabc3f5b724a3b4e359c632d2a98396707
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Security for temp-text 2026.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.