figure - demodlg inputaskfloat dialog this dialog automatically checks the input for valid floating-point syntax before it returnsand it is representative of collection of single-value input dialogs (askinteger and askstring prompt for integer and string inputstooit returns the input as floating-point number object (not as stringwhen the ok button or enter key is pressedor the python none object if the user clicks cancel its two relatives return the input as integer and string objects instead when the demo bar' open button is pressedwe get the standard file open dialog made by calling askopenfilename and captured in figure - this is windows ' look-and-feelit can look radically different on macslinuxand older versions of windowsbut appropriately so similar dialog for selecting save-as filename is produced by calling asksaveasfile name (see the text widget section in for first exampleboth file dialogs let the user navigate through the filesystem to select subject filenamewhich is returned with its full directory pathname when open is pressedan empty string comes back if cancel is pressed instead both also have additional protocols not demonstrated by this examplethey can be passed filetypes keyword argument-- set of name patterns used to select fileswhich appear in the pull-down list near the bottom of the dialog tkinter tourpart