Skip to content

Instantly share code, notes, and snippets.

View zachgates's full-sized avatar

Zach Gates zachgates

View GitHub Profile
@zachgates
zachgates / print_progress.py
Last active July 29, 2018 08:56 — forked from Kerruba/text-progress-bar-in-console.py
Function for displaying code progress
# -*- coding: utf-8 -*-
import sys
def print_progress(stage, total, prefix='', suffix='', decimals=1, bar_length=100):
"""
Call in a loop to create terminal progress bar
@params:
stage - Required : current stage (Int)
total - Required : total stages (Int)