""############################################################################utility windows may be useful in other programs ############################################################################""from tkinter import from pp gui tools windows import popupwindow class helppopup(popupwindow)""custom toplevel that shows help text as scrolled text source button runs passed-in callback handler alternativeuse html file and webbrowser module ""myfont 'systemcustomizable mywidth start width def __init__(selfappnamehelptexticonfile=noneshowsource=lambda: )popupwindow __init__(selfappname'help'iconfilefrom tkinter scrolledtext import scrolledtext nonmodal dialog bar frame(selfpack first=clip last bar pack(side=bottomfill=xcode button(barbg='beige'text="source"command=showsourcequit button(barbg='beige'text="cancel"command=self destroycode pack(pady= side=leftquit pack(pady= side=lefttext scrolledtext(selfadd text scrollbar text config(font=self myfonttext config(width=self mywidthtoo big for showinfo text config(bg='steelblue'fg='white'erase on btn or return text insert(' 'helptexttext pack(expand=yesfill=bothself bind(""(lambda eventself destroy())def askpasswordwindow(appnameprompt)""modal dialog to input password string getpass getpass uses stdinnot gui tksimpledialog askstring echos input ""win popupwindow(appname'prompt' configured toplevel label(wintext=promptpack(side=leftentvar stringvar(winent entry(wintextvariable=entvarshow='*'display for input ent pack(side=rightexpand=yesfill=xent bind(''lambda eventwin destroy()ent focus_set()win grab_set()win wait_window(win update(update forces redraw return entvar get(ent widget is now gone pymailgui implementation