summaryrefslogtreecommitdiffstats
path: root/Lib/tkinter/messagebox.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2018-10-12 16:01:00 (GMT)
committerGitHub <noreply@github.com>2018-10-12 16:01:00 (GMT)
commitdc0d571b6401527f236b0513f29847e2b9b8a188 (patch)
treef6c9193dc5a7352e511ed1e5ca5e6faab1afc9b8 /Lib/tkinter/messagebox.py
parent2d6097d027e0dd3debbabc702aa9c98d94ba32a3 (diff)
downloadcpython-dc0d571b6401527f236b0513f29847e2b9b8a188.zip
cpython-dc0d571b6401527f236b0513f29847e2b9b8a188.tar.gz
cpython-dc0d571b6401527f236b0513f29847e2b9b8a188.tar.bz2
bpo-34964: Make Tkinter sources more readable by adding blank lines. (GH-9822)
Diffstat (limited to 'Lib/tkinter/messagebox.py')
-rw-r--r--Lib/tkinter/messagebox.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/tkinter/messagebox.py b/Lib/tkinter/messagebox.py
index 5c35d5a..4a711fa 100644
--- a/Lib/tkinter/messagebox.py
+++ b/Lib/tkinter/messagebox.py
@@ -78,32 +78,39 @@ def _show(title=None, message=None, _icon=None, _type=None, **options):
# In others we get a Tcl_Obj.
return str(res)
+
def showinfo(title=None, message=None, **options):
"Show an info message"
return _show(title, message, INFO, OK, **options)
+
def showwarning(title=None, message=None, **options):
"Show a warning message"
return _show(title, message, WARNING, OK, **options)
+
def showerror(title=None, message=None, **options):
"Show an error message"
return _show(title, message, ERROR, OK, **options)
+
def askquestion(title=None, message=None, **options):
"Ask a question"
return _show(title, message, QUESTION, YESNO, **options)
+
def askokcancel(title=None, message=None, **options):
"Ask if operation should proceed; return true if the answer is ok"
s = _show(title, message, QUESTION, OKCANCEL, **options)
return s == OK
+
def askyesno(title=None, message=None, **options):
"Ask a question; return true if the answer is yes"
s = _show(title, message, QUESTION, YESNO, **options)
return s == YES
+
def askyesnocancel(title=None, message=None, **options):
"Ask a question; return true if the answer is yes, None if cancelled."
s = _show(title, message, QUESTION, YESNOCANCEL, **options)
@@ -113,6 +120,7 @@ def askyesnocancel(title=None, message=None, **options):
return None
return s == YES
+
def askretrycancel(title=None, message=None, **options):
"Ask if operation should be retried; return true if the answer is yes"
s = _show(title, message, WARNING, RETRYCANCEL, **options)