Skip to main content

refreshit

A print to always print in the same line, refreshing the content

Setup

$ pip install refreshit

Code sample

Refreshing some text

from refreshit import uprint
from time import sleep

uprint("Beautiful is better than ugly.")
sleep(1)
uprint("Explicit is better than implicit.\n")
sleep(1)

Loading state

from refreshit import uprint
from time import sleep

load = ["Loading", "Loading.", "Loading..", "Loading..."]
for i in range(4):
    for item in load:
        uprint(item)
        sleep(0.2)
uprint("Complete\n")

A progress bar

from refreshit import uprint
from time import sleep

n = 20
squares = [u"\u25A0"*x+" "+"{:.0f}".format((x/(n-1))*100)+"%" for x in range(n)]
for i in range(2):
    for item in squares:
        uprint(item)
        sleep(0.1)
print()

Release files for refreshit 0.2

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

Source distribution (sdist)

Source distribution for refreshit 0.2
File Size Uploaded
refreshit-0.2.tar.gz 3.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for refreshit 0.2
File Interpreter ABI Platform
refreshit-0.2-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 6.6 kB

Release files / refreshit-0.2.tar.gz

Download URL refreshit-0.2.tar.gz
Size 3.0 kB
Tags Source
SHA-256 checksum
How to use checksums
aa0010e393ce67c365356d82c1abd6f2ef7bcf89651d6960b7c82b0c4ab4a338
BLAKE2b-256 checksum
How to use checksums
cdf157f2dc62907747825b00507594e9700a470233fd8a30f3a0462eb8c1f6fc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / refreshit-0.2-py2.py3-none-any.whl

Download URL refreshit-0.2-py2.py3-none-any.whl
Size 3.6 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
0cff582b7edf8aeae873ff883cf631fae14ea90cc3c8df306b41095c78098392
BLAKE2b-256 checksum
How to use checksums
9331efd864b27134c63b54adc12f8ad3223edb5477f46f00f684802c02b92103
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.2 This release

2 release files

0.1

2 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