AlkantarClanX12
Current Path : /usr/lib64/python2.7/idlelib/ |
Current File : //usr/lib64/python2.7/idlelib/textView.pyc |
� {fc @ 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 s5 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 � | | _ | j r1| 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 is_modalt transientt grab_sett wait_window( t selfR R t textt modalt _htest( ( s( /usr/lib64/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( ( s( /usr/lib64/python2.7/idlelib/textView.pyR 0 s c C s$ | j r | j � n | j � d S( N( R t grab_releaset destroy( R t event( ( s( /usr/lib64/python2.7/idlelib/textView.pyR A s N( t __name__t __module__t __doc__t Truet FalseR R t NoneR ( ( ( s( /usr/lib64/python2.7/idlelib/textView.pyR s $ c C s t | | | | � S( N( R ( R R R R ( ( s( /usr/lib64/python2.7/idlelib/textView.pyt view_textG 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 strRL t read( R R t filenamet encodingR RO t textFilet err( ( s( /usr/lib64/python2.7/idlelib/textView.pyt view_fileJ s t __main__s idlelib.idle_test.test_textviewt verbosityi t exit( t run( RH t TkinterRR R R RI RL RK R[ RF t unittestt mainRJ t idlelib.idle_test.htestR_ ( ( ( s( /usr/lib64/python2.7/idlelib/textView.pyt <module> s ?