Skip to main content
Join the official 2020 Python Developers SurveyStart the survey!

Prints a progress bar to the terminal from python.

Project description

pyterm_progress_bar

Prints a progress bar to the terminal from python.

ProgressBar

import pyterm_progress_bar

progress_bar = pyterm_progress_bar.ProgressBar(
    name='Progress',  # Default
    char='#'  # Default
)
progress_bar.start()

for i in range (0, 5):
    # Do stuff
    progress_bar.update((i+1)/5)  # between 0 and 1 inclusive.

Loop

pyterm_progress_bar can automatically perform a loop for you to save you having to do the difficult math.

import pyterm_progress_bar

def my_func(counter, data):  # data param is optional here
    # Do stuff
    # 'counter' is the loop counter
    # 'data' is whatever you pass as 'param' in the next step

loop = pyterm_progress_bar.Loop(
    my_func,
    number_of_iterations=300,
    param=['foo', 'bar', '🐙'],  # Optional
    progress_bar_name='Running my_func',  # Default
    progress_bar_char='#'  # Default
)
loop.execute()

Project details


Download files

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

Files for pyterm-progress-bar, version 0.0.1
Filename, size File type Python version Upload date Hashes
Filename, size pyterm_progress_bar-0.0.1.tar.gz (2.1 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page