from textconfig import my dir is on the path opensaskuseropensencodingsavesuseknownencodingsavesaskusersavesencodingelsefrom textconfig import always from this package opensaskuseropensencodingsavesuseknownencodingsavesaskusersavesencodingftypes [('all files''*')('text files'txt')('python files'py')for file open dialog customize in subclass or set in each instance colors [{'fg':'black''bg':'white'}{'fg':'yellow''bg':'black'}{'fg':'white''bg':'blue'}{'fg':'black''bg':'beige'}{'fg':'yellow''bg':'purple'}{'fg':'black''bg':'brown'}{'fg':'lightgreen''bg':'darkgreen'}{'fg':'darkblue''bg':'orange'}{'fg':'orange''bg':'darkblue'}color pick list first item is default tailor me as desired or do pickbg/fg chooser fonts [('courier' +fontscale'normal')('courier' +fontscale'normal')('courier' +fontscale'bold')('courier' +fontscale'italic')('times' +fontscale'normal')('helvetica' +fontscale'normal')('ariel' +fontscale'normal')('system' +fontscale'normal')('courier' +fontscale'normal')platform-neutral fonts (familysizestyleor pop up listbox make bigger on linux use 'bold italicfor also 'underline'etc def __init__(selfloadfirst=''loadencode='')if not isinstance(selfguimaker)raise typeerror('texteditor needs guimaker mixin'self setfilename(noneself lastfind none self opendialog none self savedialog none self knownencoding none unicodetill open or save self text focus(else must click in text if loadfirstself update( else line see book self onopen(loadfirstloadencodedef start(self)run by guimaker __init__ self menubar configure menu/toolbar ('file' guimaker menu def tree [('open ' self onopen)build in method for self ('save' self onsave)labelshortcutcallback ('save as ' self onsaveas)('new' self onnew)'separator'('quit ' self onquit)pyedita text editor program/object