MINI MINI MANI MO

Path : /lib64/python2.7/idlelib/
File Upload :
Current File : //lib64/python2.7/idlelib/ColorDelegator.pyc

ó
Eì]c@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.pyRWs@						

			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ƒ|jrtr=dGHndSqWq	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 
		Û	

OHA YOOOO