KekLib.IpyUtils

Contents

KekLib.IpyUtils#

KekLib.IpyUtils.py - Utility functions for interactive user prompts in Jupyter notebooks.

ask_user(question, callback=None, output_widget=None)#

Display a Yes/No dialog in a dedicated Output widget.

Parameters:#

questionstr

The question to present to the user.

callbackfunction, optional

A function to call with the user’s response (True for Yes, False for No).

output_widgetipywidgets.Output, optional

An existing Output widget to use for displaying the dialog. If None, a new one is created.

Returns:#

output_widget : ipywidgets.Output