]7ec@sddlZddlZddlZddlZddlTddlmZddgZddgZdZx/eD]'Z ej j e roe Z d ZqoqoWdZ x/eD]'Z ej j e re Zd Z qqWe se r\ejjd esd ejdZejjd ene sLd ejdZejjd enejd n[[ dZdddYZdZedS(iN(t*(tManPages/depot/sundry/man/manns/usr/local/man/manns/depot/sundry/man/man3s/usr/local/man/man3iis sgFailed to find mann directory. Please add the correct entry to the MANNDIRLIST at the top of %s script.s%s sgFailed to find man3 directory. Please add the correct entry to the MAN3DIRLIST at the top of %s script.cCsktj|}g}xE|D]=}|dd!dkr|ddkr|j|d qqW|j|S(Niit.t ln123456789(tostlistdirtappendtsort(tmandirtfilestnamestfile((s0/usr/lib64/python2.7/Demo/tkinter/guido/tkman.pyt listmanpages0s # t SelectionBoxcBseZddZdZdZdZdZdZdZ dZ dZ d Z d Z d Zd Zd ZRS(cCsg|_t|dd|_|jjdddt|jj|_t|jdd|_|jjdddtt|jdd|_|jjd tdddtt|jdd |_ |j jd t dddtt ||_ t |j dd d d dtdd|_|jjd tt|jdd|_|jjdddtd|j d|j|jjdddtd|j d|j|j|jds s(6tchoicestFrameRtpacktBOTHtmasterRRtLEFTRtRIGHTt StringVart chaptervart MenubuttontRAISEDRtTOPtMenuRtadd_radiobuttontMAN3DIRt newchaptertMANNDIRtListboxtSUNKENR!tButtontentry_cbR$tEntryR%tXR&tNONEt search_cbR't BooleanVartcasevart CheckbuttontFLATR(R)tLabelR*tBOTTOMRRtbindt listbox_cbt entry_tabt search_tabttext_tabt focus_settset(tselfR2((s0/usr/lib64/python2.7/Demo/tkinter/guido/tkman.pyt__init__;s                    cCs/|jj}g|_|jt|dS(N(R6tgetR.taddlistR (RTR((s0/usr/lib64/python2.7/Demo/tkinter/guido/tkman.pyR=s cCs=||jkr/|jj||jjn|jdS(N(R.RRtupdate(RTtchoice((s0/usr/lib64/python2.7/Demo/tkinter/guido/tkman.pyt addchoicescCs1||jt|j)|jj|jdS(N(R.tlenRRX(RTtlist((s0/usr/lib64/python2.7/Demo/tkinter/guido/tkman.pyRWs cGs|jdS(N(RX(RTte((s0/usr/lib64/python2.7/Demo/tkinter/guido/tkman.pyRBscCsQ|jj}|rMt|dkrM|jj|d}|j|ndS(Nii(R!t curselectionR[RVt show_page(RTR]t selectionR((s0/usr/lib64/python2.7/Demo/tkinter/guido/tkman.pyRNscGs|j|jjdS(N(t search_stringR)RV(RTR]((s0/usr/lib64/python2.7/Demo/tkinter/guido/tkman.pyRFscCs|jjdS(N(R)RR(RTR]((s0/usr/lib64/python2.7/Demo/tkinter/guido/tkman.pyROscCs|jjdS(N(R%RR(RTR]((s0/usr/lib64/python2.7/Demo/tkinter/guido/tkman.pyRPscCs|jjdS(N(R%RR(RTR]((s0/usr/lib64/python2.7/Demo/tkinter/guido/tkman.pyRQscCs|jj}t|t|d|j}|sF|jjn|jjdt d}x9|D]1}||krd}n|jj t |qiW|r|S|jj }|dkr|jjdSdS(NcSs|| |kS(N((Rtkeytn((s0/usr/lib64/python2.7/Demo/tkinter/guido/tkman.pyttii( R%RVtfilterR[R.RtbellR!tdeletetAtEndtinserttsize(RTRbtokt exactmatchtitemRc((s0/usr/lib64/python2.7/Demo/tkinter/guido/tkman.pyt updatelists     cCsF|j}|rB|j||jjdt|jndS(Ni(RoR_R%RhRi(RTR((s0/usr/lib64/python2.7/Demo/tkinter/guido/tkman.pyRXs   cCs]d|jj|f}tjd|d}|jj||jd<|jj|dS(Ns%s/%s.?snroff -man %s | ul -itrR(R6RVRtpopenRtkillR*t parsefile(RTRR tfp((s0/usr/lib64/python2.7/Demo/tkinter/guido/tkman.pyR_s   cCs`|s|jjdGHdS|jjs7tj}nd}y.|r[tj||}ntj|}Wn-tjk r}|jjdG|GHdSX|j j t }t j |t j|d }|j j t}t j |t j|d }|} d} x4|d}||krM| dkr8Pn| }d}d} n|j jd|d|} |j| } | dkrd} tdt|jd} y |j jdttWntk rnX|j jdd || fd || | f|j jt d || f|j jt PqqW| s\|jjndS( NsEmpty search strings Regex error:Riis%d.0 linestarts %d.0 lineendtsels%d.%d(RRgRHRVtret IGNORECASEtNonetcompileterrorRtindextAtInserttstringtatoitfindRiR)tmaxR[tgroupt tag_removet AtSelFirstt AtSelLasttTclErrorttag_addtmark_settyview_pickplace(RTR)tmaptprogtmsgtheretlinenotendt endlinenot wraplinenotfoundtlinetiRc((s0/usr/lib64/python2.7/Demo/tkinter/guido/tkman.pyRasd              N(t__name__t __module__RxRUR=RZRWRBRNRFRORPRQRoRXR_Ra(((s0/usr/lib64/python2.7/Demo/tkinter/guido/tkman.pyR 9s M            cCsWt}t|}tjdr9|jtjdn|jdd|jdS(Ni(tTkR tsystargvR_tminsizetmainloop(troottsb((s0/usr/lib64/python2.7/Demo/tkinter/guido/tkman.pytmains    ((RRR}RvtTkinterRt MANNDIRLISTt MAN3DIRLISTt foundmanndirtdirtpathtexistsR>t foundman3dirR<tstderrtwriteRRtexitR R R(((s0/usr/lib64/python2.7/Demo/tkinter/guido/tkman.pytsD