AlkantarClanX12

Your IP : 18.117.154.134


Current Path : /proc/self/root/opt/alt/python35/lib64/python3.5/idlelib/__pycache__/
Upload File :
Current File : //proc/self/root/opt/alt/python35/lib64/python3.5/idlelib/__pycache__/Percolator.cpython-35.pyc



��Yfk�@s�ddlmZddlmZGdd�d�Zdd�Zedkr�ddlZejd	d
ddd
�ddl	m
Z
e
e�dS)�)�WidgetRedirector)�	Delegatorc@s^eZdZdd�Zdd�Zddd�Zddd	�Zd
d�Zdd
�ZdS)�
PercolatorcCsw||_t|�|_t|�|_|_|jjd|j�|j_|jjd|j�|j_g|_	dS)N�insert�delete)
�textr�redirr�top�bottom�registerrr�filters)�selfr�r�7/opt/alt/python35/lib64/python3.5/idlelib/Percolator.py�__init__s	zPercolator.__init__cCsnx&|j|jk	r(|j|j�qWd|_|jjd�d|_|jj�d|_d|_dS)N)r	r
�removefilter�setdelegater�closer)r
rrrrs		
	zPercolator.closeNcCs|jj|||�dS)N)r	r)r
�index�charsZtagsrrrrszPercolator.insertcCs|jj||�dS)N)r	r)r
Zindex1Zindex2rrrrszPercolator.deletecCsGt|t�st�|jdks*t�|j|j�||_dS)N)�
isinstancer�AssertionError�delegaterr	)r
�filterrrr�insertfilter"szPercolator.insertfiltercCs�t|t�st�|jdk	s*t�|j}||kr[|j|_|jd�n[x;|j|k	r�||jk	s�t�|j�|j}q^W|j|j�|jd�dS)N)rrrrr	rr
Z
resetcache)r
r�frrrr)s	

zPercolator.removefilter)	�__name__�
__module__�__qualname__rrrrrrrrrrrs	
rcs�ddl}ddl}Gdd�dt�}|j|�}|jd�ttt|jd|j	����\}}}}|j	d||df�|j
|�}	t|	�}
|
j�|
j
�|d��|d	������fd
d�}����fdd
�}|	j�|j��|j|ddd|d��}
|
j�|j��|j|ddd|d��}|j�dS)Nrc@s4eZdZdd�Zdd�Zdd�ZdS)z_percolator.<locals>.TracercSs||_tj|d�dS)N)�namerr)r
rrrrr?s	z$_percolator.<locals>.Tracer.__init__cWs't|jd|�|jj|�dS)Nz: insert)�printrrr)r
�argsrrrrCsz"_percolator.<locals>.Tracer.insertcWs't|jd|�|jj|�dS)Nz: delete)r rrr)r
r!rrrrGsz"_percolator.<locals>.Tracer.deleteN)rrrrrrrrrr�Tracer>sr"zTest Percolatorz[x+]z+%d+%d��t1�t2cs �j�r�n���dS)N)�getr)�pin�poutr$�var1rr�toggle1Vsz_percolator.<locals>.toggle1cs �j�r�n���dS)N)r&r)r'r(r%�var2rr�toggle2Xsz_percolator.<locals>.toggle2rZTracer1ZcommandZvariableZTracer2)Ztkinter�rerZToplevel�title�list�map�int�splitZgeometryZTextrrrZpackZIntVarZCheckbutton)�parentZtkr-r"Zbox�widthZheight�x�yr�pr*r,Zcb1Zcb2r)r'r(r$r%r)r+r�_percolator:s,

3		
!
!r8�__main__Nz!idlelib.idle_test.test_percolator�	verbosity��exitF)�run)Zidlelib.WidgetRedirectorrZidlelib.Delegatorrrr8rZunittest�mainZidlelib.idle_test.htestr=rrrr�<module>s5)