Your IP : 52.14.140.108


Current Path : /opt/alt/python35/lib64/python3.5/idlelib/__pycache__/
Upload File :
Current File : //opt/alt/python35/lib64/python3.5/idlelib/__pycache__/textView.cpython-35.opt-2.pyc



���][
�@s�ddlTddljZGdd�de�Zddd�Zdddd	�Zed
kr�ddl	Z	e	j
ddd
dd�ddlmZee�dS)�)�*Nc@s=eZdZdddd�Zdd�Zddd	�ZdS)
�
TextViewerTFcCs&tj||�|jdd�|jddd|j�d|j�|sQdndf�d|_d	|_|j�|j	|�|j
d
|j�||_|j
j�|jd|j�|jd|j�|j
jd
|�|j
jdt�|r"|j|�|j�|j�dS)NZborderwidth�z=%dx%d+%d+%di�i��
�dz#ffffffz#000000ZWM_DELETE_WINDOWz<Return>z<Escape>g�state)�Toplevel�__init__Z	configureZgeometryZwinfo_rootxZwinfo_rooty�bg�fg�
CreateWidgets�title�protocol�Ok�parent�textViewZ	focus_set�bind�insert�configZDISABLEDZ	transientZgrab_setZwait_window)�selfrr
�text�modalZ_htest�r�-/opt/alt/python35/lib64/python3.5/textView.pyr	s(	
!		

	


zTextViewer.__init__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)NZreliefZheighti�rZCloseZcommandZ	takefocusZorientZhighlightthicknessr�wraprr
ZyscrollcommandZside�fill�expand)ZFrameZSUNKENZButtonr�FALSEZbuttonOkZ	ScrollbarZVERTICALZ
scrollbarViewZTextZWORDrr
rrZyview�set�packZRIGHT�YZLEFT�TRUEZBOTHZBOTTOM�XZTOP)rZ	frameTextZframeButtonsrrrr/s
zTextViewer.CreateWidgetsNcCs|j�dS)N)Zdestroy)r�eventrrrr@sz
TextViewer.Ok)�__name__�
__module__�__qualname__r	rrrrrrrs#rTcCst||||�S)N)r)rr
rrrrr�	view_textDsr'cCs�y/t|dd|��}|j�}WdQRXWnxtk
rctjdddd|d|�YnZtk
r�}z'tjdddt|�d|�WYdd}~XnXt||||�SdS)	N�r�encodingr
zFile Load Error�messagezUnable to load file %r .rzUnicode Decode Error)�open�read�IOError�tkMessageBoxZ	showerror�UnicodeDecodeError�strr')rr
�filenamer)r�file�contents�errrrr�	view_fileGs

r5�__main__zidlelib.idle_test.test_textview�	verbosity��exitF)�run)
�tkinterZtkinter.messageboxZ
messageboxr.rrr'r5r$Zunittest�mainZidlelib.idle_test.htestr:rrrr�<module>s
<

?>