Your IP : 13.59.26.145


Current Path : /lib64/python2.7/Tools/scripts/
Upload File :
Current File : //lib64/python2.7/Tools/scripts/redemo.pyc

�
�mec@sRdZddlTddlZddd��YZd�ZedkrNe�ndS(	sCBasic regular expression demostration facility (Perl style syntax).i����(t*NtReDemocBs;eZd�Zd�Zd�Zdd�Zdd�ZRS(c
Cs||_t|jdtdd�|_|jjdtdt�t|j�|_|jjdt�|jj	�|j
�t|jdddt�|_|jjdtdt�t|jdtdd�|_|jjdt�|jjdt�t
|�|_|jjdtdt�t|�|_|jjd�t|jdd	d
|jddd|j�|_|jjdt�t|jdd
d
|jddd|j�|_|jjdt�t|jdddd�|_|jjdtdd�|jjddd�t|jdddt�|_|jjdt�t|j�|_|jjdddt�|jjd|j�|jjd|j�d|_!|j�|jj"�}|jj"|d|d �|jj"�}|jj"|d|d �dS(Ntanchorttexts&Enter a Perl-style regular expression:tsidetfilltsEnter a string to search:tfirstsHighlight first matchtvariabletvaluetcommandsHighlight all matchestalltwidthi<theightitexpandithitt
backgroundtyellowsGroups:s<Key>(#tmastertLabeltWt
promptdisplaytpacktTOPtXtEntrytregexdisplayt	focus_sett
addoptionst
statusdisplaytlabeldisplaytFramet	showframet	StringVartshowvartsettRadiobuttont	recompiletshowfirstradiotLEFTtshowallradiotTextt
stringdisplaytBOTHt
tag_configuret
grouplabeltListboxt	grouplisttbindt
reevaluatetNonetcompiledtbindtags(tselfRtbtags((s,/usr/lib64/python2.7/Tools/scripts/redemo.pyt__init__	sZ	

			
c
Cs�g|_g|_g|_x�dD]�}t|j�ddkrst|j�}|jdt�|jj|�nt	t
|�}t�}t|d	|d
|ddd|d
|j
�}|jdt�|jj|�|jj|�q"WdS(Nt
IGNORECASEtLOCALEt	MULTILINEtDOTALLtVERBOSEiiRRRtoffvaluetonvalueR
R(s
IGNORECASEsLOCALEs	MULTILINEsDOTALLsVERBOSE(tframestboxestvarstlenRRRRtappendtgetattrtretIntVartCheckbuttonR%R'(R5tnametframetvaltvartbox((s,/usr/lib64/python2.7/Tools/scripts/redemo.pyRHs*			
		cCs4d}x!|jD]}||j�B}qW|}|S(Ni(RAtget(R5tflagsRK((s,/usr/lib64/python2.7/Tools/scripts/redemo.pytgetflags_s
cCs�yNtj|jj�|j��|_|jd}|jjddd|�WnBtj	k
r�}d|_|jjddt|�dd�nX|j�dS(NRRRsre.error: %stred(
REtcompileRRMROR3RRtconfigterrorR2tstrR1(R5teventtbgtmsg((s,/usr/lib64/python2.7/Tools/scripts/redemo.pyR%fs
	c
CsUy|jjddt�Wntk
r-nXy|jjddt�Wntk
r[nX|jjdt�|js|dS|jjddd�|jjddd�|jjdt�}d}d}xJ|t	|�kr|jj
||�}|dkrPn|j�\}}||kr4|d}d}nd}d	|}d	|}	|jj
|||	�|dkr�|jj|�t|j��}
|
jd|j��xDtt	|
��D]-}d
||
|f}|jjt|�q�Wn|d}|jj�dkr�Pq�q�W|dkr>|jjdd
dd�n|jjdd�dS(NRs1.0thit0iRRtorangeis1.0 + %d charss%2d: %rRRs
(no match)R(R*t
tag_removetENDtTclErrorR/tdeleteR3R,RMRBtsearchR2tspanttag_addtyview_pickplacetlisttgroupstinserttgrouptrangeR"RRR(
R5RURtlasttnmatchestmRttagtpfirsttplastRctitg((s,/usr/lib64/python2.7/Tools/scripts/redemo.pyR1ssT

	
	



N(t__name__t
__module__R7RROR2R%R1(((s,/usr/lib64/python2.7/Tools/scripts/redemo.pyRs
	?		
cCs6t�}t|�}|jd|j�|j�dS(NtWM_DELETE_WINDOW(tTkRtprotocoltquittmainloop(troottdemo((s,/usr/lib64/python2.7/Tools/scripts/redemo.pytmain�s	t__main__((t__doc__tTkinterRERRxRo(((s,/usr/lib64/python2.7/Tools/scripts/redemo.pyt<module>s
�