diplomat.wx_gui.progress_bar.TqdmWxPanel

class diplomat.wx_gui.progress_bar.TqdmWxPanel(*args: Any, **kwargs: Any)[source]

Bases: Panel

A WX progress bar which mimics the tqdm interface. Currently supports the update, __iter__, and reset methods…

__init__(parent, wid=wx.ID_ANY)[source]

Construct the new progress bar…

Parameters:
  • parent – The parent wx widget…

  • wid – The id of this new wx widget…

Methods

GetTextExtent(string)

__init__(parent[, wid])

Construct the new progress bar...

close()

message(msg)

Set the message of the progress bar...

reset([total])

Reset the progress bar to 0, and set a new total value.

update([amount])

Update the progress bar by amount, and display the change...

Attributes

UPDATE_RATE

__call__(iterable: Iterable = None, total: int = None)[source]

Set the iterable or total of this progress bar, and return this current progress bar with the changed values. (Does not construct a new object). This provides compatibility with the tqdm progress bar api.

__iter__()[source]

Iterate the iterable stored in this progress bar, also displaying its progress…

_display()[source]

Displays the wx progress bar. Internal, should not be called directly!

message(msg: str)[source]

Set the message of the progress bar…

reset(total=None)[source]

Reset the progress bar to 0, and set a new total value.

update(amount=1)[source]

Update the progress bar by amount, and display the change…