Skip to main content

Time Till Done (ttd) is a simple progress bar for your long running Python scripts

Project description

https://travis-ci.org/JarrodCTaylor/ttd.svg?branch=master

Time Till Done ttd for short is a simple progress bar to help give you some feedback for your long running Python scripts.

Installation

pip install ttd

Demo Gif

https://cloud.githubusercontent.com/assets/4416952/3593813/177b9caa-0c8e-11e4-9e6d-87340fe43bd1.gif

Usage

The easiest way to use the module is in a for loop as demonstrated in the demo gif above and the code snippet below.

import time
from ttd import ttd

for i in ttd(range(99)):
    time.sleep(.05)

You may also use update the progress bar manually by calling print_ttd(index, total) throughout your script as demonstrated below.

import time
from ttd import print_ttd

print_ttd(0, 5)
time.sleep(.5)

print_ttd(1, 5)
time.sleep(.04)

print_ttd(2, 5)
time.sleep(.5)

print_ttd(3, 5)
time.sleep(.5)

print_ttd(4, 5)
time.sleep(.5)

print_ttd(5, 5)
print("\ndone")

Project details


Release history Release notifications

History Node

0.1.0

This version
History Node

0.0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
ttd-0.0.1.tar.gz (1.8 kB) Copy SHA256 hash SHA256 Source None Jul 17, 2014

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page