A visually appealing progress bar for long lasting computations.
Project description
A visually appealing progress bar for long lasting computations. It also computes the remaining estimated time for the task by ad-hoc learning of the completion so far. For this reason scikit-learn and numpy are required.
You can install progressor via
pip install progressor
and import it in python using:
import progressor
Compute a task as follows:
from __future__ import print_function
import time
res = [ 0 ]
def task(elem):
time.sleep(0.01)
res[0] += elem
progressor.progress_list(range(1000), task, prefix="sleep list")
print(res[0])
or in a range:
def task_range(cur_ix, length):
task(cur_ix)
progressor.progress(0, 1000, task_range, prefix="sleep range")
print(res[0])
The output looks roughly like this:
sleep list: |████████████▌ | 62.30% (T 7.492s ETA 6.791s)
If no estimate of the progress towards completion can be made use:
def repeat(num):
while True:
yield num
progressor.progress_indef(repeat(1), task, prefix="sleep indefinitely")
which produces output like this:
sleep indefinitely: /
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
progressor-0.1.4.tar.gz
(4.5 kB
view hashes)
Built Distribution
Close
Hashes for progressor-0.1.4-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b3c0938815a173d0c218dea7e6f1f713c403e91256b3965f919515f114df9c18 |
|
MD5 | 97ffa0d1222cc76e7083944a001120fb |
|
BLAKE2b-256 | 74b88f1c1d8f2a6dfc0677c67da41a0074ece2a5b2847120177b9ea79327a7eb |