ok

Mini Shell

Direktori : /proc/thread-self/root/lib64/python2.7/idlelib/
Upload File :
Current File : //proc/thread-self/root/lib64/python2.7/idlelib/ColorDelegator.pyc

�
_цdc@s�ddlZddlZddlZddlZddlTddlmZddlmZe	Z
d�Zd�Zej
e�ej�Zej
dej�Zej
d�Zd	efd
��YZd�Zedkr�e�ndS(
i����N(t*(t	Delegator(tidleConfcCsd|dj|�dS(s9Return a named group pattern matching list of alternates.s(?P<%s>t|t)(tjoin(tnamet
alternates((s./usr/lib64/python2.7/idlelib/ColorDelegator.pytanyscCs�dtdtj�d}gtt�D]!}|jd�s't|�^q'}dtd|�d}tddg�}d}|d	}|d
}|d}|d}	td
||	||g�}
|d|d|d|
dtddg�S(Ns\btKEYWORDt_s([^.'\"\\#]\b|^)tBUILTINtCOMMENTs#[^\n]*s((\br|u|ur|R|U|UR|Ur|uR|b|B|br|Br|bR|BR)?s'[^'\\\n]*(\\.[^'\\\n]*)*'?s"[^"\\\n]*(\\.[^"\\\n]*)*"?s''''[^'\\]*((\\.|'(?!''))[^'\\]*)*(''')?s'"""[^"\\]*((\\.|"(?!""))[^"\\]*)*(""")?tSTRINGRtSYNCs\n(Rtkeywordtkwlisttdirt__builtin__t
startswithtstr(tkwRtbuiltinlisttbuiltintcommenttstringprefixtsqstringtdqstringt	sq3stringt	dq3stringtstring((s./usr/lib64/python2.7/idlelib/ColorDelegator.pytmake_pats!



s\s+(\w+)s.*?\b(as)\btColorDelegatorcBs�eZd�Zd�Zd�Zd�Zdd�Zdd�ZdZ	e
ZeZ
dd�ZdZdd�Zd�Zd	�Zd
�Zd�ZRS(
cCs6tj|�t|_t|_t|_|j�dS(N(Rt__init__tprogtidprogtasprogtLoadTagDefs(tself((s./usr/lib64/python2.7/idlelib/ColorDelegator.pyR!&s

			cCs�|jdk	r|jd�ntj||�|dk	rk|j�|jd|j�|jdd�nt	|_
t|_dS(Ns<<toggle-auto-coloring>>s1.0tend(
tdelegatetNonetunbindRtsetdelegatet
config_colorstbindttoggle_colorize_eventtnotify_rangetTruetstop_colorizingtFalsetallow_colorizing(R&R(((s./usr/lib64/python2.7/idlelib/ColorDelegator.pyR+-s
	cCsJx6|jj�D]%\}}|r|j||�qqW|jd�dS(Ntsel(ttagdefstitemst
tag_configuret	tag_raise(R&ttagtcnf((s./usr/lib64/python2.7/idlelib/ColorDelegator.pyR,:scCs�tjddd�}i
tj|d�d6tj|d�d6tj|d�d	6tj|d
�d6tj|d�d
6idd6dd6d6idd6dd6d6tj|d�d6tj|d�d6tj|d�d6|_tr�dG|jGHndS(NtmaintThemeRRRRR	RRRR
t
definitiont
DEFINITIONt
backgroundt
foregroundRtTODOtbreaktBREAKterrortERRORthitR5(Rt	GetOptiontGetHighlightR)R5tDEBUG(R&ttheme((s./usr/lib64/python2.7/idlelib/ColorDelegator.pyR%@scCsG|j|�}|jj|||�|j||dt|��dS(Ns+%dc(tindexR(tinsertR/tlen(R&RKtcharsttags((s./usr/lib64/python2.7/idlelib/ColorDelegator.pyRLRscCs3|j|�}|jj||�|j|�dS(N(RKR(tdeleteR/(R&tindex1tindex2((s./usr/lib64/python2.7/idlelib/ColorDelegator.pyRPWscCs�|jd||�|jr.tr*dGHndS|jrQt|_trQdGHqQn|jr�trhdGHn|jd|j�|_ndS(NRAscolorizing already scheduledsstop colorizingsschedule colorizingi(	ttag_addtafter_idRIt
colorizingR0R1R3taftert
recolorize(R&RQRR((s./usr/lib64/python2.7/idlelib/ColorDelegator.pyR/`s				cCsw|jr9|j}d|_tr)dGHn|j|�nt|_t|_|rs|jsg|j	�qs||_
ndS(Nscancel scheduled recolorizer(RTR)RItafter_cancelR2R3R0R1RUtdestroytclose_when_done(R&RZRT((s./usr/lib64/python2.7/idlelib/ColorDelegator.pytclosens						
cCs�|jr9|j}d|_tr)dGHn|j|�n|jre|jretrYdGHnt|_n|j|_|jr�|jr�|jd|j	�|_ntr�dG|jr�dp�dGHndS(Nscancel scheduled recolorizersstop colorizingisauto colorizing turnedtontoffRB(
RTR)RIRXR3RUR0R1RVRW(R&teventRT((s./usr/lib64/python2.7/idlelib/ColorDelegator.pyR.|s"			
cCs3d|_|js$tr dGHndS|js?tr;dGHndS|jrZtrVdGHndSz\t|_t|_tr}dGHnt	j
�}|j�t	j
�}tr�d||GHnWdt|_X|jr|jdd�rtr�dGHn|j
d	|j�|_n|jr/|j}d|_|j�ndS(
Nsno delegatesauto colorizing is offsalready colorizings
colorizing...s%.3f secondsRAs1.0sreschedule colorizingi(R)RTR(RIR3RUR2R1R0ttimetclocktrecolorize_maint
tag_nextrangeRVRWRZRY(R&tt0tt1ttop((s./usr/lib64/python2.7/idlelib/ColorDelegator.pyRW�s@						

			cCsMd}x@trH|jd|�}|s+Pn|\}}|jd||�|jd|�}|ro|d}nd}d}|}d}t}x�|sD|}|j|d|�}t|dd�}d|j|d	�k}|j||�}	|	s�dSx*|j	j
�D]}
|j|
||�qW||	}|jj|�}x�|r�xf|j
�j�D]R\}}
|
r`|j|�\}}|j||d
||d
|�|
dkr|jj||�}|r�|jd�\}}|jd
|d
||d
|�q�q�|
dkr�d|kr9|jd�}nt|�}xgtr�|jj|||�}|spPn|jd�\}}|jd|d
||d
|�qHWq�q`q`W|jj||j��}qGWd|j|d	�kr�|}d}nt}|s|jd|�n|j�|jr�tr=dGHndSq�Wq	WdS(Ns1.0RARits+%d lines linestartiids-1cs+%dctdeftclassR>timportt#R	scolorizing stopped(RgRh(R0Rbt
tag_removet
tag_prevrangeR2RKtmint	tag_namestgetR5tkeysR"tsearcht	groupdictR6tspanRSR#tmatchRMR$R'tupdateR1RI(R&tnexttitemtheadttailRNtlines_to_gettoktmarktlineR9tmtkeytvaluetatbtm1tendpos((s./usr/lib64/python2.7/idlelib/ColorDelegator.pyRa�s�	
	
						
	cCs1x*|jj�D]}|j|dd�qWdS(Ns1.0R'(R5RpRk(R&R9((s./usr/lib64/python2.7/idlelib/ColorDelegator.pytremovecolors�sN(t__name__t
__module__R!R+R,R%R)RLRPRTR0R3R2RUR/RZR[R.RWRaR�(((s./usr/lib64/python2.7/idlelib/ColorDelegator.pyR $s 		
					QcCs�ddlm}t�}|jd|j�tdd�}|jdddd	�|j�||�}t�}|j	|�|j
�dS(
Ni����(t
PercolatortWM_DELETE_WINDOWR?twhitetexpanditfilltboth(tidlelib.PercolatorR�tTktwm_protocoltquittTexttpackt	focus_setR tinsertfiltertmainloop(R�trootttexttptd((s./usr/lib64/python2.7/idlelib/ColorDelegator.pyR;�s	
	
t__main__(R_treRRtTkintertidlelib.DelegatorRtidlelib.configHandlerRR2RIRRtcompiletSR"R#R$R R;R�(((s./usr/lib64/python2.7/idlelib/ColorDelegator.pyt<module>s 
		�	

Zerion Mini Shell 1.0