bootstack.ask_integer#

bootstack.ask_integer(prompt, *, title='', value=None, min_value=None, max_value=None, step=None, value_format=None, parent=None)#

Show an integer-input dialog with optional range validation.

Parameters:
  • prompt (str) – Prompt text displayed above the input field.

  • title (str) – Dialog window title.

  • value (int | None) – Pre-filled initial value.

  • min_value (int | None) – Minimum accepted value.

  • max_value (int | None) – Maximum accepted value.

  • step (int | None) – Increment/decrement step size.

  • value_format (str | None) – ICU format pattern for displaying the value (e.g. '#,##0' for thousands separators). See Format specs.

  • parent (Any) – Parent widget. Defaults to the active root window.

Returns:

The entered integer, or None if canceled.

Return type:

int | None