^c@sddlZddlTddlmZddlmZdZdZejdZejdZejd Z d efd YZ d e fd YZ e Z dZ edkre ndS(iN(t*(t_tkinter(t ScrolledTexts*-Courier-Bold-R-Normal-*-120-*s!*-Courier-Medium-O-Normal-*-120-*s:^ Page [1-9][0-9]*[ ]+\|^.*Last change:.*[1-9][0-9]* s^[ ]* s^[ ]*[Xv!_][Xv!_ ]* tEditableManPagecBsneZd dZdZdZdZeZdZdZ dZ dZ dZ d d Z RS( cKshttj||f||jddd|jddt|jddtd|_d|_dS(NtXt underlineit!tfontt_i( tapplyRt__init__t tag_configtBOLDFONTt ITALICFONTtNonetfptlineno(tselftmastertcnf((s2/usr/lib64/python2.7/Demo/tkinter/guido/ManPage.pyR s  cCs |jdkS(N(RR(R((s2/usr/lib64/python2.7/Demo/tkinter/guido/ManPage.pytbusy%scCs|jr|jndS(N(Rt _endparser(R((s2/usr/lib64/python2.7/Demo/tkinter/guido/ManPage.pytkill)s cCs-|j||jj|tj|jdS(N(t _startparserttktcreatefilehandlerRtREADABLEt _filehandler(RR((s2/usr/lib64/python2.7/Demo/tkinter/guido/ManPage.pytasyncparsefile.s cCs4|jj}|s#|jdS|j|dS(N(RtreadlineRt _parseline(RRtmasktnextline((s2/usr/lib64/python2.7/Demo/tkinter/guido/ManPage.pyR6s  cCszddlm}|d|d}|j|d}|j|x'|j}|s[Pn|j|qEW|jdS(Ni(tselectgcSs||ggg|dS(Ni((RttoutR!((s2/usr/lib64/python2.7/Demo/tkinter/guido/ManPage.pytavail@stheight(R!tgetintRRRR(RRR!R#R$R ((s2/usr/lib64/python2.7/Demo/tkinter/guido/ManPage.pyt syncparsefile>s  cCs|jrtdn|j||_d|_d|_d|_d|_|d}t |d<|j dt ||ds