Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
Sebastian Raschka 2014-2017
Python Progress Indicator Utility
Author: Sebastian Raschka
License: BSD 3 clause
Contributors: https://github.com/rasbt/pyprind/graphs/contributors
Code Repository: https://github.com/rasbt/pyprind
PyPI: https://pypi.python.org/pypi/PyPrind
"""
from pyprind.prog_class import Prog
import time
class ProgPercent(Prog):
"""
Initializes a progress bar object that allows visuzalization
of an iterational computation in the standard output screen.
Parameters
----------
iterations : `int`
Number of iterations for the iterative computation.
track_time : `bool` (default: `True`)
Prints elapsed time when loop has finished.
stream : `int` (default: 2).
Setting the output stream.
Takes `1` for stdout, `2` for stderr, or a custom stream object
title : `str` (default: `''`).
Setting a title for the percentage indicator.
monitor : `bool` (default: `False`)
Author: Sebastian Raschka
License: BSD 3 clause
Contributors: https://github.com/rasbt/pyprind/graphs/contributors
Code Repository: https://github.com/rasbt/pyprind
PyPI: https://pypi.python.org/pypi/PyPrind
"""
from math import floor
from pyprind.prog_class import Prog
import time
class ProgBar(Prog):
"""
Initializes a progress bar object that allows visuzalization
of an iterational computation in the standard output screen.
Parameters
----------
iterations : `int`
Number of iterations for the iterative computation.
track_time : `bool` (default: `True`)
Prints elapsed time when loop has finished.
width : `int` (default: 30)
Sets the progress bar width in characters.
stream : `int` (default: 2).
Setting the output stream.
Takes `1` for stdout, `2` for stderr, or a custom stream object
title : `str` (default: `''`)