An assortment of handy Python tools made by someone named Andrew
Project description
About
andrewtools
is an assortment of handy Python tools made by someone named Andrew.
Quick Start
Supported Python Versions
Python 3.8+
Mac / Linux
pip install andrewtools
Windows
py -m pip install andrewtools
Examples
Progress Bar
If you are working on a program that uses a loop that takes a significant amount of time to execute, it can be nice to follow the progress of your program while it runs. Use print_progress_bar
to visualize the progress via the command line.
import time
from andrewtools import print_progress_bar
iterations = 10
for i in range(iterations):
print_progress_bar(i, iterations, width=10, prefix="Progress")
time.sleep(0.5)
# Printed to command line:
Progress | ***------- | 30% <- % and progress bar update in-place while loop runs
- Warning: this function will not play well if the loop includes other print statements. The progress bar may get printed on a separate line for each iteration, which may not be desirable.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
andrewtools-0.0.1.tar.gz
(4.2 kB
view hashes)
Built Distribution
Close
Hashes for andrewtools-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d4179a35387baafde7abfb11202d93ff0aa8ee4316ae624f62ff501ca6a4f281 |
|
MD5 | 6d157c8fb8819d7ac059565fc08bf451 |
|
BLAKE2b-256 | 203cd3f8f7d2f5b0529ffaa592343ba256a5df1f200c7b4f3fe303d1ceec46ab |