Back to index

python3.2  3.2.2
Classes | Functions | Variables
tkinter.messagebox Namespace Reference

Classes

class  Message

Functions

def _show
def showinfo
def showwarning
def showerror
def askquestion
def askokcancel
def askyesno
def askyesnocancel
def askretrycancel

Variables

string ERROR = "error"
string INFO = "info"
string QUESTION = "question"
string WARNING = "warning"
string ABORTRETRYIGNORE = "abortretryignore"
string OK = "ok"
string OKCANCEL = "okcancel"
string RETRYCANCEL = "retrycancel"
string YESNO = "yesno"
string YESNOCANCEL = "yesnocancel"
string ABORT = "abort"
string RETRY = "retry"
string IGNORE = "ignore"
string CANCEL = "cancel"
string YES = "yes"
string NO = "no"

Function Documentation

def tkinter.messagebox._show (   title = None,
  message = None,
  _icon = None,
  _type = None,
  options 
) [private]

Definition at line 67 of file messagebox.py.

00067 
00068 def _show(title=None, message=None, _icon=None, _type=None, **options):
00069     if _icon and "icon" not in options:    options["icon"] = _icon
00070     if _type and "type" not in options:    options["type"] = _type
00071     if title:   options["title"] = title
00072     if message: options["message"] = message
00073     res = Message(**options).show()
00074     # In some Tcl installations, yes/no is converted into a boolean.
00075     if isinstance(res, bool):
00076         if res:
00077             return YES
00078         return NO
00079     # In others we get a Tcl_Obj.
00080     return str(res)

Here is the call graph for this function:

Here is the caller graph for this function:

def tkinter.messagebox.askokcancel (   title = None,
  message = None,
  options 
)

Definition at line 97 of file messagebox.py.

00097 
00098 def askokcancel(title=None, message=None, **options):
00099     "Ask if operation should proceed; return true if the answer is ok"
00100     s = _show(title, message, QUESTION, OKCANCEL, **options)
00101     return s == OK

Here is the call graph for this function:

Here is the caller graph for this function:

def tkinter.messagebox.askquestion (   title = None,
  message = None,
  options 
)

Definition at line 93 of file messagebox.py.

00093 
00094 def askquestion(title=None, message=None, **options):
00095     "Ask a question"
00096     return _show(title, message, QUESTION, YESNO, **options)

Here is the call graph for this function:

Here is the caller graph for this function:

def tkinter.messagebox.askretrycancel (   title = None,
  message = None,
  options 
)

Definition at line 116 of file messagebox.py.

00116 
00117 def askretrycancel(title=None, message=None, **options):
00118     "Ask if operation should be retried; return true if the answer is yes"
00119     s = _show(title, message, WARNING, RETRYCANCEL, **options)
00120     return s == RETRY
00121 
00122 
00123 # --------------------------------------------------------------------
00124 # test stuff

Here is the call graph for this function:

def tkinter.messagebox.askyesno (   title = None,
  message = None,
  options 
)

Definition at line 102 of file messagebox.py.

00102 
00103 def askyesno(title=None, message=None, **options):
00104     "Ask a question; return true if the answer is yes"
00105     s = _show(title, message, QUESTION, YESNO, **options)
00106     return s == YES

Here is the call graph for this function:

Here is the caller graph for this function:

def tkinter.messagebox.askyesnocancel (   title = None,
  message = None,
  options 
)

Definition at line 107 of file messagebox.py.

00107 
00108 def askyesnocancel(title=None, message=None, **options):
00109     "Ask a question; return true if the answer is yes, None if cancelled."
00110     s = _show(title, message, QUESTION, YESNOCANCEL, **options)
00111     # s might be a Tcl index object, so convert it to a string
00112     s = str(s)
00113     if s == CANCEL:
00114         return None
00115     return s == YES

Here is the call graph for this function:

Here is the caller graph for this function:

def tkinter.messagebox.showerror (   title = None,
  message = None,
  options 
)

Definition at line 89 of file messagebox.py.

00089 
00090 def showerror(title=None, message=None, **options):
00091     "Show an error message"
00092     return _show(title, message, ERROR, OK, **options)

Here is the call graph for this function:

Here is the caller graph for this function:

def tkinter.messagebox.showinfo (   title = None,
  message = None,
  options 
)

Definition at line 81 of file messagebox.py.

00081 
00082 def showinfo(title=None, message=None, **options):
00083     "Show an info message"
00084     return _show(title, message, INFO, OK, **options)

Here is the call graph for this function:

Here is the caller graph for this function:

def tkinter.messagebox.showwarning (   title = None,
  message = None,
  options 
)

Definition at line 85 of file messagebox.py.

00085 
00086 def showwarning(title=None, message=None, **options):
00087     "Show a warning message"
00088     return _show(title, message, WARNING, OK, **options)

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

Definition at line 45 of file messagebox.py.

Definition at line 37 of file messagebox.py.

Definition at line 49 of file messagebox.py.

Definition at line 31 of file messagebox.py.

Definition at line 47 of file messagebox.py.

Definition at line 32 of file messagebox.py.

Definition at line 51 of file messagebox.py.

Definition at line 38 of file messagebox.py.

Definition at line 39 of file messagebox.py.

Definition at line 33 of file messagebox.py.

Definition at line 46 of file messagebox.py.

Definition at line 40 of file messagebox.py.

Definition at line 34 of file messagebox.py.

Definition at line 50 of file messagebox.py.

Definition at line 41 of file messagebox.py.

Definition at line 42 of file messagebox.py.