part display code in onview of the list window class)""trysavedir self temppartdir message self origmessage (contypesavepathself saveonepart(savedirpartnamemessageexceptshowerror(appname'error while writing part file'printstack(sys exc_info()elseself openparts([(contypeos path abspath(savepath))]reuse def onparts(self)""show message part/attachments in pop-up windowuses same file naming scheme as save on splitif non-multipartsingle part full body text ""partnames self partslist(self origmessagemsg '\njoin(['message parts:\ 'partnamesshowinfo(appnamemsgdef onsplit(self)""pop up save dir dialog and save all parts/attachments thereif desiredpop up html and multimedia parts in web browsertext in texteditorand well-known doc types on windowscould show parts in view windows where embedded text editor would provide save buttonbut most are not readable text""savedir self partsdialog show(class attrat prior dir if savedirtk dir choosernot file trypartfiles self saveparts(savedirself origmessageexceptshowerror(appname'error while writing part files'printstack(sys exc_info()elseif self okaytoopenpartsself openparts(partfilesdef askopen(selfappnameprompt)if not self verifypartopensreturn true elsereturn askyesno(appnamepromptpop-up dialog def openparts(selfpartfiles)""auto-open well known and safe file typesbut only if verified by the user in pop upother types must be opened manually from save dirat this pointthe named parts have been already mime-decoded and saved as raw bytes in binary-mode filesbut text parts may be in any unicode encodingpyedit needs to know the encoding to decodewebbrowsers may have to guess or be toldpymailgui implementation