mirror of https://github.com/tqdm/tqdm.git
parent
3b5352a50e
commit
98955ab138
22
README.md
22
README.md
|
@ -27,25 +27,27 @@ pip install -e git+https://github.com/tqdm/tqdm.git#egg=master
|
|||
def tqdm(iterable, desc='', total=None,
|
||||
leave=False, file=sys.stderr,
|
||||
min_interval=0.5, miniters=1):
|
||||
|
||||
"""Get an iterable object, and return an iterator which acts exactly like the
|
||||
iterable, but prints a progress meter and updates it every time a value is
|
||||
requested.
|
||||
|
||||
"""Get an iterable object, and return an iterator which acts exactly like
|
||||
the iterable, but prints a progress meter and updates it every time a
|
||||
value is requested.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
desc: str
|
||||
A short string, describing the progress, that is added in the beginning of the line.
|
||||
A short string, describing the progress, that is added in the beginning
|
||||
of the line.
|
||||
total : int
|
||||
The number of expected iterations. If not given, len(iterable) is used if it is defined.
|
||||
The number of expected iterations. If not given, len(iterable) is used
|
||||
if it is defined.
|
||||
file : `io.TextIOWrapper` or `io.StringIO`
|
||||
A file-like object to output the progress message to.
|
||||
leave : bool
|
||||
If it is False, tqdm deletes its traces from screen after it has finished iterating over
|
||||
all elements.
|
||||
If it is False, tqdm deletes its traces from screen after it has
|
||||
finished iterating over all elements.
|
||||
min_interval : float
|
||||
If less than min_interval seconds or miniters iterations have passed since the last
|
||||
progress meter update, it is not updated again.
|
||||
If less than min_interval seconds or miniters iterations have passed
|
||||
since the last progress meter update, it is not updated again.
|
||||
"""
|
||||
|
||||
def trange(*args, **kwargs):
|
||||
|
|
2
tox.ini
2
tox.ini
|
@ -19,4 +19,4 @@ after_success:
|
|||
basepython = python2.7
|
||||
deps = flake8
|
||||
commands =
|
||||
flake8 --max-line-length=100 --count --statistics tqdm/
|
||||
flake8 --count --statistics tqdm/
|
||||
|
|
|
@ -58,24 +58,26 @@ class StatusPrinter(object):
|
|||
def tqdm(iterable, desc='', total=None,
|
||||
leave=False, file=sys.stderr,
|
||||
min_interval=0.5, miniters=1):
|
||||
"""Get an iterable object, and return an iterator which acts exactly like the
|
||||
iterable, but prints a progress meter and updates it every time a value is
|
||||
requested.
|
||||
"""Get an iterable object, and return an iterator which acts exactly like
|
||||
the iterable, but prints a progress meter and updates it every time a
|
||||
value is requested.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
desc: str
|
||||
A short string, describing the progress, that is added in the beginning of the line.
|
||||
A short string, describing the progress, that is added in the beginning
|
||||
of the line.
|
||||
total : int
|
||||
The number of expected iterations. If not given, len(iterable) is used if it is defined.
|
||||
The number of expected iterations. If not given, len(iterable) is used
|
||||
if it is defined.
|
||||
file : `io.TextIOWrapper` or `io.StringIO`
|
||||
A file-like object to output the progress message to.
|
||||
leave : bool
|
||||
If it is False, tqdm deletes its traces from screen after it has finished iterating over
|
||||
all elements.
|
||||
If it is False, tqdm deletes its traces from screen after it has
|
||||
finished iterating over all elements.
|
||||
min_interval : float
|
||||
If less than min_interval seconds or miniters iterations have passed since the last
|
||||
progress meter update, it is not updated again.
|
||||
If less than min_interval seconds or miniters iterations have passed
|
||||
since the last progress meter update, it is not updated again.
|
||||
"""
|
||||
if total is None:
|
||||
try:
|
||||
|
|
Loading…
Reference in New Issue