Usage:
======
Class ProgBar(name, lenght):
----------------------------
name is a string
lenght is an integer which represents the number of elements in the bar
Methods:
========
start():
--------
Start the progression bar in a thread
the progression and thread stop automaticaly when the "percent" property reaches 100%
stop():
-------
Stop the progression bar and the thread
It is recommended to call the join() method after
fill():
-------
Add an element to the bar, and match the corresponding percentage
isAlive():
----------
Returns True if the bar's thread is running, False otherwise
join():
-------
Wait until the threaded bar terminates.
It is recomended to call this method after a stop() call
properties:
===========
percent:
--------
percentage of the bar progression
Example Using step progression::
>>> def printatestbar1():
... bar = ProgBar('test1', 20)
... bar.start()
... while bar.isAlive():
... time.sleep(0.1)
... bar.fill()
... bar.join()
>>> printatestbar1()
test1 [####################] 100%
>>>
Example Using percentage progression::
>>> def printatestbar2():
... bar = ProgBar('test2', 20)
... bar.start()
... while bar.isAlive():
... bar.percent += 1
... time.sleep(0.1)
... bar.join()
>>> printatestbar2()
test2 [####################] 100%
>>>
Example Interupting the progression bar::
>>> def printatestbar3():
... bar = ProgBar('test3', 20)
... bar.start()
... while bar.isAlive():
... bar.percent += 1
... if bar.percent == 50:
... bar.stop()
... break
... time.sleep(0.1)
... bar.join()
>>> printatestbar3()
test3 [##########- ] 50%
>>>
===============
Release Notes :
===============
Release 0.1:
============
First Version
Release 0.2:
============
Removed the destructor (__del__ method) because of:
+ The Warning here:
http://docs.python.org/reference/datamodel.html#object.__del__
+ Destroyed objects where not automaticaly removed by
the garbage collector as described here:
http://docs.python.org/library/gc.html#gc.garbage
Which could cause memory usage increase.
Release 0.3:
============
Changed author's contact info.
Metadata
Release files for progbar 0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| progbar-0.3.zip | 3.5 kB | Without provenance | Details for progbar-0.3.zip |
Release files / progbar-0.3.zip
| Download URL | progbar-0.3.zip |
|---|---|
| Size | 3.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9f30c0fe98d8eeb74180530b56775cab234bd092247e41358d85bcc87516c235
|
|
BLAKE2b-256 checksum How to use checksums |
c6d784b6eadb130e12383470401dd4f809f1893baf58a8a5316ea3de8fd1740a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for progbar 0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.