iqm.station_control.interface.progress.get_progress_bar_callback

iqm.station_control.interface.progress.get_progress_bar_callback#

get_progress_bar_callback()#

Return a callback that creates or updates progress bars from status updates.

In a notebook kernel, renders progress as HTML updated in place via IPython.display, avoiding tqdm’s reliance on terminal \r redraws (which print a new bar per update outside a real TTY, e.g. under nbconvert/papermill). Outside a notebook, falls back to plain tqdm bars.

Notebook rendering keeps one display handle per status label so multiple bars can update in place at the same time. Labels therefore need to be unique across concurrently active loops; if two loops reuse the same label they will update the same rendered bar.

Return type:

Callable[[Iterable[tuple[str, int, int]]], None]