EasyDialogs -- Python library reference
Next: FrameWork
Prev: macspeech
Up: Macintosh Specific Services
Top: Top
14.11. Standard module EasyDialogs
The EasyDialogs
module contains some simple dialogs for
the Macintosh, modelled after the stdwin
dialogs with similar
names.
The EasyDialogs
module defines the following functions:
- Message (str) -- function of module EasyDialogs
-
A modal dialog with the message text str, which should be at
most 255 characters long, is displayed. Control is returned when the
user clicks ``OK''.
- AskString (prompt[, default]) -- function of module EasyDialogs
-
Ask the user to input a string value, in a modal dialog. Prompt
is the promt message, the optional default arg is the initial
value for the string. All strings can be at most 255 bytes
long. AskString returns the string entered or
None
in
case the user cancelled.
- AskYesNoCancel (question[, default]) -- function of module EasyDialogs
-
Present a dialog with text question and three buttons labelled
``yes'', ``no'' and ``cancel''. Return
1
for yes, 0
for
no and -1
for cancel. The default return value chosen by
hitting return is 0
. This can be changed with the optional
default argument.
Note that EasyDialogs
does not currently use the notification
manager. This means that displaying dialogs while the program is in
the background will need to unexpected results and possibly crashes.
Next: FrameWork
Prev: macspeech
Up: Macintosh Specific Services
Top: Top