Fork me on GitHub
Release:
Date:
1.3
Feb 14, 2012
Flattr Mktoc

Table Of Contents

Download

Get latest source archive,
mktoc-1.3.tar.gz, or install with:

pip install mktoc --upgrade --user

Found a Bug?

Fill out a report on the issue tracker.

This Page

3.6. mktoc.progress_bar

Module for mktoc that prints a progress indication.

The default usage is to prompt the user when an operation is running that the user must wait for. The following object classes are:

class mktoc.progress_bar.ProgressBar(notice_txt, bar_max=0)[source]

Bases: object

Creates a progress bar string to be printed by the calling function.

Initialize object defaults.

Parameters:
  • notice_txt (str) – Message printed alongside the progress bar.
  • bar_max (int) – Maximum size of the progress bar class.
bar_max

The maximum input input value expected by the progress bar. This value should be set before trying to print the progress bar. All percentage calculations are based from this value. It is OK to update this value as many times as needed, however it might confuse the user.