Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
for i in range(n):
mbar.update()
mper = pyprind.ProgPercent(n, stream=sys.stdout)
for i in range(n):
mper.update()
mbar2 = pyprind.ProgBar(n, stream='test')
for i in range(n):
mbar2.update()
for i in pyprind.prog_bar(range(n), stream=sys.stdout):
# do something
pass
for i in pyprind.prog_percent(range(n), stream=sys.stdout):
# do something
pass
for i in pyprind.prog_bar(range(n), stream='test'):
# do something
pass
perc.update()
print('\n%s' % (80 * '='))
print('%s\n' % (80 * '='))
print('Testing stdout Stream\n')
perc = pyprind.ProgPercent(n, stream=sys.stdout)
for i in range(n):
time.sleep(sleeptime)
perc.update()
print('\n%s' % (80 * '='))
print('%s\n' % (80 * '='))
print('Testing Percentage Indicator Generator\n')
for i in pyprind.prog_percent(range(n), stream=sys.stdout):
time.sleep(sleeptime)
print('\n%s' % (80 * '='))
print('%s\n' % (80 * '='))
print('Testing monitor function\n')
perc = pyprind.ProgPercent(n, monitor=True)
for i in range(n):
time.sleep(sleeptime)
perc.update()
print(perc)
print('\n%s' % (80 * '='))
print('%s\n' % (80 * '='))