It will display progress up to 100%.
Example:
from Pbar import Pbar
myfile = Pbar(pfile="/tmp/somefile", size='25.9kb, timeout=20')
myfile.show_progress()
The above example will watch the file '/tmp/somefile' and display
the progress up to 25.9kb. If the file does not exist within 20
seconds then it will raise an exception.
Example (using fork to get the file):
from Pbar import Pbar
import os
url = 'http://www.someurl.com/path/to/somefile'
child = os.fork()
if child == 0:
os.system('wget %s -q -O /tmp/somefile' %url)
else:
myfile = Pbar(pfile='/tmp/somefile', size='120mb', timeout=10)
myfile.show_progress()
Required args: pfile, size
+ pfile:
String (path to file). The file to watch.
+ size:
String of number with denomination. (e.g. 100mb).
The expected total size of the file. e.g. '2gb'. (Valid sizes = b, kb, mb, gb).
Optional args: timeout, show_size_progress
+ timeout:
Integer. The timeout (in seconds) Pbar will wait for the file
to exist once show_progress() has been called. This
is useful if you are waiting for the file to get created.
The default is 5 seconds.
+ show_size_progress:
Boolean. Default is False. Setting this to true
will change the output from showing 'File: and Current size:'
to showing the 'current size of total size'. This way is not
best.
Metadata
Release files for Pbar 1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| Pbar-1.0.tar.gz | Details for Pbar-1.0.tar.gz |
Release files / Pbar-1.0.tar.gz
| Download URL | Pbar-1.0.tar.gz |
|---|---|
| Size | 2.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a77d5a966cb0aec9b02dfd717d3d289147852dbb10de4cdf5dd3af5ddf247bb5
|
|
BLAKE2b-256 checksum How to use checksums |
10f60367bb71ee5e6a435d56af90567c56c4a0294712db75c36e23b31be6ed88
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for Pbar 1.0
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.