""pop up blocking wait message boxthread waits main gui event thread stays alive during wait but gui is inoperable during this wait stateuses quit redef here because lowernot leftmost""def __init__(selfappnamemessage)popupwindow __init__(selfappname'busy'self protocol('wm_delete_window'lambda: ignore deletes label label(selftext=message 'win quit(to erase label config(height= width= cursor='watch'busy cursor label pack(self makemodal(self messageself label messagelabel def makemodal(self)self focus_set(grab application self grab_set(wait for threadexit def changetext(selfnewtext)self label config(text=self message 'newtextdef quit(self)self destroy(don' verify quit class busyboxnowait(busyboxwait)""pop up nonblocking wait window call changetext to show progressquit to close ""def makemodal(self)pass if __name__ ='__main__'helppopup('spam''see figure \ 'print(askpasswordwindow('spam''enter password')input('enter to exit'pause if clicked wraplinesline split tools the module in example - implements general tools for wrapping long linesat either fixed column or the first delimiter at or before fixed column pymailgui uses this file' wraptext function for text in viewreplyand forward windowsbut this code is potentially useful in other programs run the file as script to watch its self-test code at workand study its functions to see its text-processing logic example - pp \internet\email\pymailgui\wraplines py ""##############################################################################split lines on fixed columns or at delimiters before columnsee alsorelated but different textwrap standard library module ( +) caveatthis assumes strsupporting bytes might help avoid some decodes##############################################################################"" the pymailgui client