parameters: (self, parent, title = None)
docstring: Initialize a dialog.
  
          Arguments:
  
              parent -- a parent window (the application window)
  
              title -- the dialog title
docstring_summary: Initialize a dialog.
docstring_tokens: Initialize a dialog .
function: def __init__(self, parent, title = None):
  
          '''Initialize a dialog.
  
          Arguments:
  
              parent -- a parent window (the application window)
  
              title -- the dialog title
          '''
          Toplevel.__init__(self, parent)
  
          self.withdraw() # remain invisible for now
          # If the master is not viewable, don't
          # make the child transient, or else it
          # would be opened withdrawn
          if parent.winfo_viewable():
              self.transient(parent)
  
          if title:
              self.title(title)
  
          self.parent = parent
  
          self.result = None
  
          body = Frame(self)
          self.initial_focus = self.body(body)
          body.pack(padx=5, pady=5)
  
          self.buttonbox()
  
  
          if not self.initial_focus:
              self.initial_focus = self
  
          self.protocol("WM_DELETE_WINDOW", self.cancel)
  
          if self.parent is not None:
              self.geometry("+%d+%d" % (parent.winfo_rootx()+50,
                                        parent.winfo_rooty()+50))
  
          self.deiconify() # become visibile now
  
          self.initial_focus.focus_set()
  
          # wait for window to appear on screen before calling grab_set
          self.wait_visibility()
          self.grab_set()
          self.wait_window(self)
function_tokens: def __init__ ( self , parent , title = None ) : Toplevel . __init__ ( self , parent ) self . withdraw ( ) # remain invisible for now # If the master is not viewable, don't # make the child transient, or else it # would be opened withdrawn if parent . winfo_viewable ( ) : self . transient ( parent ) if title : self . title ( title ) self . parent = parent self . result = None body = Frame ( self ) self . initial_focus = self . body ( body ) body . pack ( padx = 5 , pady = 5 ) self . buttonbox ( ) if not self . initial_focus : self . initial_focus = self self . protocol ( "WM_DELETE_WINDOW" , self . cancel ) if self . parent is not None : self . geometry ( "+%d+%d" % ( parent . winfo_rootx ( ) + 50 , parent . winfo_rooty ( ) + 50 ) ) self . deiconify ( ) # become visibile now self . initial_focus . focus_set ( ) # wait for window to appear on screen before calling grab_set self . wait_visibility ( ) self . grab_set ( ) self . wait_window ( self )