Current File : //opt/imh-python/lib/python2.7/idlelib/textView.pyo |
�
��Wc @ s� d Z d d l Td d l Z d e f d � � YZ e d � Z d e d � Z e d k r� d d l
Z
e
j d d
d d e �d d
l
m Z e e � n d S( s Simple text browser for IDLE
i����( t *Nt
TextViewerc B s2 e Z d Z e e d � Z d � Z d d � Z RS( s* A simple text viewer dialog for IDLE
c C s) t j | | � | j d d � | j d d d | j � d | j � | sQ d n d f � d | _ d | _ | j � | j | � | j
d
| j � | | _ | j
j � | j d | j � | j d | j � | j
j d
| � | j
j d t � | r%| j | � | j � | j � n d S( sH Show the given text in a scrollable window with a 'close' button
If modal option set to False, user can interact with other windows,
otherwise they will be unable to interact with other windows until
the textview window is closed.
_htest - bool; change box location when running htest.
t borderwidthi s =%dx%d+%d+%di� i� i
id s #ffffffs #000000t WM_DELETE_WINDOWs <Return>s <Escape>g t stateN( t Toplevelt __init__t configuret geometryt winfo_rootxt winfo_rootyt bgt fgt
CreateWidgetst titlet protocolt Okt parentt textViewt focus_sett bindt insertt configt DISABLEDt transientt grab_sett wait_window( t selfR R t textt modalt _htest( ( si /builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/idlelib/textView.pyR s(
!
c
C sC t | d t d d �} t | � } t | d d d | j d t �| _ t | d t d t d d
�| _ t | d t
d d
d | j d
| j �| _
| j j d | j
j � | j
j d | j j � | j j � | j j d t d t � | j
j d t d t d t � | j d t d t � | j d t d t d t � d S( Nt relieft heighti� R t Closet commandt takefocust orientt highlightthicknessi t wrapR R t yscrollcommandt sidet fillt expand( t Framet SUNKENt ButtonR t FALSEt buttonOkt Scrollbart VERTICALt
scrollbarViewt Textt WORDR R R R t yviewt sett packt RIGHTt Yt LEFTt TRUEt BOTHt BOTTOMt Xt TOP( R t frameTextt frameButtons( ( si /builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/idlelib/textView.pyR
/ s
c C s | j � d S( N( t destroy( R t event( ( si /builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/idlelib/textView.pyR @ s N( t __name__t
__module__t __doc__t Truet FalseR R
t NoneR ( ( ( si /builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/idlelib/textView.pyR s # c C s t | | | | � S( N( R ( R R R R ( ( si /builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/idlelib/textView.pyt view_textD s c C s� y: | r* d d l } | j | d � } n t | d � } Wnb t k
rm t j d d d d | d | � nK t k
r� } t d d d t | � d | � n Xt | | | j � | � Sd S( Ni����t rR s File Load Errort messages Unable to load file %r .R s Unicode Decode Error( t codecst opent IOErrort tkMessageBoxt showerrort UnicodeDecodeErrort strRJ t read( R R t filenamet encodingR RM t textFilet err( ( si /builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/idlelib/textView.pyt view_fileG s
t __main__s idlelib.idle_test.test_textviewt verbosityi t exit( t run( RF t TkinterRP R R RG RJ RI RY RD t unittestt mainRH t idlelib.idle_test.htestR] ( ( ( si /builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/idlelib/textView.pyt <module> s
<