ó q”þfc@sGdZddlTddlZdefd„ƒYZed„Zded„Ze dkrCe ƒZ e j d ƒd Z ee d ƒjƒZee d d dd„ƒZejdeƒee d ddd„ƒZejdeƒee d ddd„ƒZejdeƒee d dde jƒZejdeƒe jƒndS(sSimple text browser for IDLE iÿÿÿÿ(t*Nt TextViewercBs/eZdZed„Zd„Zdd„ZRS(s*A simple text viewer dialog for IDLE cCstj||ƒ|jddƒ|jddd|jƒd|jƒdfƒd|_d|_|jƒ|j |ƒ|j d |j ƒ||_ |j jƒ|jd |j ƒ|jd |j ƒ|j jd |ƒ|j jd tƒ|r|j|ƒ|jƒ|jƒndS(sJShow the given text in a scrollable window with a 'close' button t borderwidthis =%dx%d+%d+%diqiôi s#ffffffs#000000tWM_DELETE_WINDOWssgtstateN(tToplevelt__init__t configuretgeometryt winfo_rootxt winfo_rootytbgtfgt CreateWidgetsttitletprotocoltOktparentttextViewt focus_settbindtinserttconfigtDISABLEDt transienttgrab_sett wait_window(tselfRRttexttmodal((s(/usr/lib64/python2.7/idlelib/textView.pyR s(         c CsCt|dtddƒ}t|ƒ}t|ddd|jdtƒ|_t|dtdtd d ƒ|_t |d t d d d |j d |j ƒ|_ |jjd|j jƒ|j jd|jjƒ|jjƒ|jjdtdtƒ|j jdtdtdtƒ|jdtdtƒ|jdtdtdtƒdS(Ntrelieftheighti¼RtClosetcommandt takefocustorientthighlightthicknessitwrapR R tyscrollcommandtsidetfilltexpand(tFrametSUNKENtButtonRtFALSEtbuttonOkt ScrollbartVERTICALt scrollbarViewtTexttWORDR R RRtyviewtsettpacktRIGHTtYtLEFTtTRUEtBOTHtBOTTOMtXtTOP(Rt frameTextt frameButtons((s(/usr/lib64/python2.7/idlelib/textView.pyR )s  cCs|jƒdS(N(tdestroy(Rtevent((s(/usr/lib64/python2.7/idlelib/textView.pyR:sN(t__name__t __module__t__doc__tTrueRR tNoneR(((s(/usr/lib64/python2.7/idlelib/textView.pyRs  cCst||||ƒS(N(R(RRRR((s(/usr/lib64/python2.7/idlelib/textView.pyt view_text>scCs—y:|r*ddl}|j|dƒ}nt|dƒ}Wn=tk ryddl}|jdddd|d|ƒnXt|||jƒ|ƒSdS(NiÿÿÿÿtrRsFile Load ErrortmessagesUnable to load file %r .R(tcodecstopentIOErrort tkMessageBoxt showerrorRHtread(RRtfilenametencodingRRKttextFileRN((s(/usr/lib64/python2.7/idlelib/textView.pyt view_fileAs     t__main__s textView tests ./textView.pyRIRRHR!cCsttdtƒS(NRH(RHtrootR(((s(/usr/lib64/python2.7/idlelib/textView.pytXsR'RTcCsttdtƒS(NRT(RTRVRQ(((s(/usr/lib64/python2.7/idlelib/textView.pyRW[ssnonmodal view_textcCsttdtdtƒS(Nsnonmodal view_textR(RHRVRtFalse(((s(/usr/lib64/python2.7/idlelib/textView.pyRW^sR (REtTkinterRNRRRFRHRGRTRCtTkRVRRQtfileRPRR,tbtn1R6R9tbtn2tbtn3RAtcloseR7tmainloop(((s(/usr/lib64/python2.7/idlelib/textView.pyts,  6