Your IP : 3.14.129.86


Current Path : /lib64/python2.7/idlelib/
Upload File :
Current File : //lib64/python2.7/idlelib/textView.pyc

�
�mec@sGdZddlTddlZdefd��YZed�Zded�Ze	dkrCe
�Zejd	�d
Z
ee
d�j�Zeedd
dd��Zejde�eedddd��Zejde�eedddd��Zejde�eedddej�Zejde�ej�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

        tborderwidthis=%dx%d+%d+%diqi�i
s#ffffffs#000000tWM_DELETE_WINDOWs<Return>s<Escape>gtstateN(tToplevelt__init__t	configuretgeometrytwinfo_rootxtwinfo_rootytbgtfgt
CreateWidgetsttitletprotocoltOktparentttextViewt	focus_settbindtinserttconfigtDISABLEDt	transienttgrab_settwait_window(tselfRRttexttmodal((s(/usr/lib64/python2.7/idlelib/textView.pyRs(
		

	


c
CsCt|dtdd�}t|�}t|ddd|jdt�|_t|dtdtd	d
�|_t	|dt
d	d
d|jd
|j�|_
|jjd|j
j�|j
jd|jj�|jj�|jjdtdt�|j
jdtdtdt�|jdtdt�|jdtdtdt�dS(Ntrelieftheighti�RtClosetcommandt	takefocustorientthighlightthicknessitwrapRRtyscrollcommandtsidetfilltexpand(tFrametSUNKENtButtonRtFALSEtbuttonOkt	ScrollbartVERTICALt
scrollbarViewtTexttWORDRRRRtyviewtsettpacktRIGHTtYtLEFTtTRUEtBOTHtBOTTOMtXtTOP(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.pyt<lambda>XsR'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.pyt<module>s,
6