403Webshell
Server IP : 118.27.122.248  /  Your IP : 216.73.217.103
Web Server : Apache
System : Linux web0264.sh.tyo1 4.18.0-553.79.1.lve.el7h.x86_64 #1 SMP Wed Oct 15 16:34:46 UTC 2025 x86_64
User : c9415830 ( 11735)
PHP Version : 8.4.17
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /opt/alt/python36/lib64/python3.6/Tools/pynche/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /opt/alt/python36/lib64/python3.6/Tools/pynche/__pycache__/TextViewer.cpython-36.pyc
3

x2_��@s*dZddlTddlZdZGdd�d�ZdS)a(TextViewer class.

The TextViewer allows you to see how the selected color would affect various
characteristics of a Tk text widget.  This is an output viewer only.

In the top part of the window is a standard text widget with some sample text
in it.  You are free to edit this text in any way you want (BAW: allow you to
change font characteristics).  If you want changes in other viewers to update
text characteristics, turn on Track color changes.

To select which characteristic tracks the change, select one of the radio
buttons in the window below.  Text foreground and background affect the text
in the window above.  The Selection is what you see when you click the middle
button and drag it through some text.  The Insertion is the insertion cursor
in the text window (which only has a background).
�)�*NzText Window...c@sbeZdZddd�Zddd�Zddd�Zddd	�Zdd
d�Zddd
�Zddd�Z	dd�Z
dd�ZdS)�
TextViewerNcCs||_|j�}t|dd�}|_|jd|j�|jd�|jd�|jd|j	�|jd|j	�|jd|j�|jd|j�t
|t|jd	d
�|jdd�d
dd�|_
|jd�}|r�|j
j|d�|jd�}|r�|j
j|d�|jd�}|r�|j
j|d�|j
j�|j
jd|jdd��|jd�}|�r2|j
jt|�y(|jddtf�\}	}
|j
jt|	|
�Wntk
�rpYnX|j
j�t�|_|jj|jdd��t�|_|jj|jdd��t|d|jt|jd �|_ |j jt!t"d!�t#|�}|_$|j�g|_%d"}x>d/D]6}
t&||
d&�}|j'|dt(d'�|j%j)|�|d(7}�qWd(}x<d0D]4}
t&||
d&�}|j'd(|d+�|j%j)|�|d(7}�qFWg|_*xtd1D]l}xdd2D]\}|d-k�r�|d(k�r��q�t+||j|d"d"|d(|j,d.�}|j'||d+�|j*j)|��q�W�q�W|j�dS)3NZPynche)Zclass_ZWM_DELETE_WINDOWzPynche Text Windowz<Alt-q>z<Alt-Q>z<Alt-w>z<Alt-W>�TEXTBGZblack�TEXTFGZwhite�#�)�relief�
background�
foreground�widthZheight�TEXT_SFG)�selectforeground�TEXT_SBG)�selectbackground�TEXT_IBG)�insertbackgroundg�TEXTz�Insert some stuff here and play
with the buttons below to see
how the colors interact in
textual displays.

See how the selection can also
be affected by tickling the buttons
and choosing a color.�TEXTINS�TEXTSELg@�TRACKPr�WHICHzTrack color changes)�text�variabler�command)Zfill�expand��Text:�
Selection:�
Insertion:)r)�row�columnZsticky��
Foreground�
Background)rr ��)r�valuer)rrr)r"r#)r!r)rr$r%)-�_TextViewer__sb�optiondbZToplevel�_TextViewer__rootZprotocol�withdraw�titleZiconnameZbind�_TextViewer__quitZTextZSUNKEN�get�_TextViewer__text�	configureZpack�insertZmark_set�INSERTZENDZtag_add�SEL�
ValueErrorZ	focus_setZ
BooleanVar�_TextViewer__trackp�setZIntVar�_TextViewer__whichZCheckbuttonZGROOVE�_TextViewer__toggletrackZ_TextViewer__t�XZYESZFrameZ_TextViewer__frame�_TextViewer__labelsZLabelZgrid�E�append�_TextViewer__radiosZRadiobutton�_TextViewer__set_color)�selfZswitchboardZmasterr(�rootZsfgZsbgZibgr0�start�end�framerr�l�col�r�rF�</opt/alt/python36/lib64/python3.6/Tools/pynche/TextViewer.py�__init__s�














zTextViewer.__init__cCs|jj�dS)N)r)�quit)r>�eventrFrFrGZ__quitvszTextViewer.__quitcCs|jj�dS)N)r)r*)r>rJrFrFrGr*yszTextViewer.withdrawcCs|jj�dS)N)r)�	deiconify)r>rJrFrFrGrK|szTextViewer.deiconifycCs|jj�dS)N)r'Zupdate_views_current)r>rJrFrFrGZ
__forceupdateszTextViewer.__forceupdatecCsl|jj�rt}|jdd}nt}|jdd}x|jD]}|j|d�q8Wx|jD]}|j|d�qTWdS)Nrr
Zdisabledforeground)�state)r
)r4r-ZNORMALr<ZDISABLEDr/r9)r>rJrLZfgrErCrFrFrGZ
__toggletrack�s
zTextViewer.__toggletrackcCs�|jj�}|j}|dkr"|d}nF|dkr4|d}n4|dkrF|d}n"|dkrX|d}n|d	krh|d
}ytj|�\}}}Wn,tjk
r�|jj�j|�\}}}YnX|jj	|||�dS)Nrr
r!r	rr
r$r�r)
r6r-r.�ColorDBZrrggbb_to_tripletZBadColorr'ZcolordbZfind_bynameZupdate_views)r>rJ�whichrZcolor�red�green�bluerFrFrGZ__set_color�s"




zTextViewer.__set_colorcCs�|jj�r�tj|||f�}|jj�}|j}|dkr@|j|d�nV|dkrV|j|d�n@|dkrl|j|d�n*|dkr�|j|d�n|d	kr�|j|d
�dS)Nr)r
r!)r	r)r
r$)rrM)r)r4r-rNZtriplet_to_rrggbbr6r.r/)r>rPrQrRZ	colornamerOrrFrFrG�update_yourself�s

zTextViewer.update_yourselfcCs�|jj�|d<|jj�|d<|jjdd�|d<|jjt�dd�|d<|jjt�|d	<|jd
|d<|jd|d
<|jd|d<|jd|d<|jd|d<dS)Nrrgzend - 1crrrrrr
rr	rr
rrrrr)r4r-r6r.Z
tag_rangesr2�indexr1)r>r(rFrFrG�save_options�szTextViewer.save_options)N)N)N)N)N)N)N)�__name__�
__module__�__qualname__rHr,r*rKZ_TextViewer__forceupdater7r=rSrUrFrFrFrGrs
\





r)�__doc__ZtkinterrNZ	ADDTOVIEWrrFrFrFrG�<module>s

Youez - 2016 - github.com/yon3zu
LinuXploit