pyface.single_choice_dialog module

A dialog that allows the user to chose a single item from a list.

pyface.single_choice_dialog.choose_one(parent, message, choices, title='Choose', cancel=True)[source]

Convenience method to show an information message dialog.

  • parent (toolkit control or None) – The toolkit control that should be the parent of the dialog.

  • message (str) – The text of the message to display.

  • choices (list) – List of objects to choose from.

  • title (str) – The text of the dialog title.

  • cancel (bool) – Whether or not the dialog can be cancelled.


choice – The selected object, or None if cancelled.

Return type