Skip to main content

Allows for easy creation of progress-bars and text

Project description

https://travis-ci.org/MisanthropicBit/progress.svg?branch=master https://pypip.in/license/progress2/badge.png

Allows for easy creation of progress-bars and text.

progress has been tested with Python 2.6, 2.7, 3.2 and 3.3, and as of now requires at least Python 2.6

Installation:

Note: PyPI already contains a progress entry, so this module is located at progress2.

You can install via pip:

pip install progress2

Alternatively, if you downloaded the source files, just run the following command from the download directory:

python setup.py install

Usage:

Creating a ProgressBar:

>>> import progress
>>> bar = progress.ProgressBar("[{progress}] {percentage:.2f}% ({minutes}:{seconds})", width=30)
>>> bar.show()
[                              ] 0.00% (0:0)>>>
>>> bar.update(26)
>>> bar.show()
[======>                       ] 26.00% (0:0)>>>
>>>

Creating a ProgressText:

>>> text = progress.ProgressText("Searching: {progress}", "|/-\\", autoreset=True)
>>> text.show()
|>>>
>>> text.update(); text.show()
/>>>
>>> text.update(); text.show()
->>>
>>> text.update(); text.show()
\>>>

Refer to the examples/ directory for some example code.

Implementation Notes:

Since most terminals cannot clear their output buffers across newlines or carriage returns, progress does not work if you insert them, e.g. progress.ProgressBar("{progress}\n{percentage}") will not be cleared from the terminal.

Project details


Download files

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

Source Distribution

progress2-1.1.0.zip (13.6 kB view details)

Uploaded Source

File details

Details for the file progress2-1.1.0.zip.

File metadata

  • Download URL: progress2-1.1.0.zip
  • Upload date:
  • Size: 13.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for progress2-1.1.0.zip
Algorithm Hash digest
SHA256 8a802d4a85758013d8abaadec33db4f664f21eec816d4efb9487748d1d52bc49
MD5 32a1d227f88c23fa1c7985e8c377fce6
BLAKE2b-256 2c063a967882b149d087a1aebbf03c714dc7267d33d8682a75a7ccf740b22e08

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page