button(toolstext=titlecommand=callbackpack(side=leftadd multiselect listbox with scrollbars listwide mailconfig listwidth or config start size listhigh mailconfig listheight or wide=charshigh=lines mails frame(selfvscroll scrollbar(mailshscroll scrollbar(mailsorient='horizontal'fontsz (sys platform[: ='winand or defaults listbg mailconfig listbg or 'whitelistfg mailconfig listfg or 'blacklistfont mailconfig listfont or ('courier'fontsz'normal'listbox listbox(mailsbg=listbgfg=listfgfont=listfontlistbox config(selectmode=extendedlistbox config(width=listwideheight=listhigh init wider listbox bind(''(lambda eventself onviewrawmail())crosslink listbox and scrollbars vscroll config(command=listbox yviewrelief=sunkenhscroll config(command=listbox xviewrelief=sunkenlistbox config(yscrollcommand=vscroll setrelief=sunkenlistbox config(xscrollcommand=hscroll setpack last clip first mails pack(side=topexpand=yesfill=bothvscroll pack(side=rightfill=bothhscroll pack(side=bottomfill=bothlistbox pack(side=leftexpand=yesfill=bothself listbox listbox ################event handlers ################def oncheckall(self)all or none click if self allmodevar get()self listbox select_set( endelseself listbox select_clear( enddef onviewrawmail(self)possibly threadedview selected messages raw text headersbody msgnums self verifyselectedmsgs(if msgnumsself getmessages(msgnumsafter=lambdaself contviewraw(msgnums)def contviewraw(selfmsgnumspyedit=true)do we need full texteditorfor msgnum in msgnumscould be nested def fulltext self getmessage(msgnumfulltext is unicode decoded if not pyeditdisplay in scrolledtext from tkinter scrolledtext import scrolledtext window windows quietpopupwindow(appname'raw message viewer' the pymailgui client