editor ongoto(int(line)editor text focus_force(noreally new non-modal widnow popup tk(popup title('pyedit grep matches% (% )(grepkeyencoding)scrolledfilenames(parent=popupoptions=matches###########################################################################tools menu commands ###########################################################################def onfontlist(self)self fonts append(self fonts[ ]del self fonts[ self text config(font=self fonts[ ]pick next font in list resizes the text area def oncolorlist(self)self colors append(self colors[ ]pick next color in list del self colors[ move current to end self text config(fg=self colors[ ]['fg']bg=self colors[ ]['bg']def onpickfg(self)self pickcolor('fg'added on def onpickbg(self)self pickcolor('bg'select arbitrary color in standard color dialog def pickcolor(selfpart)(triplehexstraskcolor(if hexstrself text config(**{parthexstr}this is too easy def oninfo(self)""pop-up dialog giving text statistics and cursor locationcaveat ( )tk insert position column counts tab as one charactertranslate to next multiple of to match visual""text self getalltext(added on in mins bytes len(textwords uses simple guesslines len(text split('\ ')any separated by whitespace words len(text split() xbytes is really chars index self text index(insertstr is unicode code points where tuple(index split(')showinfo('pyedit information''current location:\ \ 'line:\ % \ncolumn:\ % \ \nwhere 'file text statistics:\ \ 'chars:\ % \nlines:\ % \nwords:\ % \ (byteslineswords)def onclone(selfmakewindow=true)"" complete gui programs