Skip to content

Progressbars retain values when restarting #136

@w4nderlust

Description

@w4nderlust

Description

If i finish and then restart a bar using AdaptiveETA, instead of showing the ETA the bar shows me the Time.

Code

import progressbar
import time

maximum = 50
widgets = [progressbar.FormatLabel('Bar'), "   ",
                       progressbar.Percentage(), " ",
                       progressbar.Bar(), " ",
                       progressbar.Timer(), " ",
                       progressbar.AdaptiveETA()]
bar = progressbar.ProgressBar(widgets=widgets,
                              max_value=maximum)

steps = 0
bar.start()
while steps < maximum:
	bar.update(steps)
	time.sleep(0.1)
	steps += 1
bar.finish()

time.sleep(0.2)

steps = 0
bar.start()
while steps < maximum:
	bar.update(steps)
	time.sleep(0.1)
	steps += 1
bar.finish()

Versions

  • Python version: 3.5.2
  • Python distribution/environment: Python
  • Operating System:Ubuntu 16.4
  • Package version: 3.30.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions