Пример #1
0
def alert(kind, prompt, ok_label="OK", **kwds):
    """Displays an alert box with one button. Does not return a value.
    Kind may be 'stop' for conditions preventing continuation,
    'caution' for warning messages, 'note' for informational
    messages, and 'query' for asking a question of the user."""

    BaseAlertFunctions.alert(kind, prompt, ok_label, **kwds)
Пример #2
0
def alert2(kind, prompt, yes_label="Yes", no_label="No", **kwds):
    """Displays an alert with two buttons. Returns 1 if the
    first button is pressed, 0 if the second button is pressed.
    The 'default' and 'cancel' arguments specify which buttons,
    if any, are activated by the standard keyboard equivalents,
    and take the values 1, 0 or None."""

    return BaseAlertFunctions.alert2(kind, prompt, yes_label, no_label, **kwds)