def useTemporaryDialog(filePath, resourceName, mayCancel,
                       *itemNames, **defaults):
    """Create a dialog, run it, capture the results, destroy the dialog,
    and return the results.
    Return None if the user cancels.
    """
    dlg = buildDialog(filePath, resourceName, mayCancel, **defaults)
    try:
        result = runDialog(dlg, mayCancel, *itemNames)
    finally:
        dlg.Destroy()
    return result
Create a dialog, run it, capture the results, destroy the dialog,
    and return the results.
    Return None if the user cancels.
    
recipes/Python/496868_Easily_creating_dialog_boxes_XRC/recipe-496868.py