KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17
System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64
User : nobody ( 99)
PHP Version : 5.2.17
Disable Function : NONE
Directory :  /usr/lib64/python2.4/idlelib/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/lib64/python2.4/idlelib/ParenMatch.pyo
mò
‚=5Dc@sbdZdkZdklZlZdklZdfd„ƒYZd„Zdfd„ƒYZdS(	sæParenMatch -- An IDLE extension for parenthesis matching.

When you hit a right paren, the cursor should move briefly to the left
paren.  Paren here is used generically; the matching applies to
parentheses, square brackets, and curly braces.

WARNING: This extension will fight with the CallTips extension,
because they both are interested in the KeyRelease-parenright event.
We'll have to fix IDLE to do something reasonable when two or more
extensions what to capture the same event.
N(sEditorWindows
index2line(sidleConft
ParenMatchcBsætZdZgZeidddddƒZeiddddddd	ƒZeiei	ƒd
ƒZ
eiddddddd
ƒZd„Zd„Z
d„Zed„Zd„Zd„Zd„Zd„Zd„Zd„ZRS(sÌHighlight matching parentheses

    There are three supported style of paren matching, based loosely
    on the Emacs options.  The style is select based on the
    HILITE_STYLE attribute; it can be changed used the set_style
    method.

    The supported styles are:

    default -- When a right paren is typed, highlight the matching
        left paren for 1/2 sec.

    expression -- When a right paren is typed, highlight the entire
        expression from the left paren to the right paren.

    TODO:
        - fix interaction with CallTips
        - extend IDLE with configuration dialog to change options
        - implement rest of Emacs highlight styles (see below)
        - print mismatch warning in IDLE status window

    Note: In Emacs, there are several styles of highlight where the
    matching paren is highlighted whenever the cursor is immediately
    to the right of a right paren.  I don't know how to do that in Tk,
    so I haven't bothered.
    t
extensionsRtstyletdefaultt
expressionsflash-delayttypetintiôthilitetbelltboolicCsJ||_|i|_t|ƒ|_d|_d|_|i|i	ƒdS(Ni(
teditwintselfttexttLastOpenBracketFindertfindertcountertNonet_restoret	set_styletSTYLE(RR
((t*/usr/lib64/python2.4/idlelib/ParenMatch.pyt__init__5s			cCs_||_|djo|i|_|i|_n*|djo|i|_|i|_ndS(NRR(	RRRtcreate_tag_defaultt
create_tagtset_timeout_lasttset_timeouttcreate_tag_expressiontset_timeout_none(RR((RR=s	

cCs^|iit|iƒƒ}|djo|iƒdSnd|_	|i
|ƒ|iƒdS(Ni(RRtfindtkeysym_typeteventtkeysymtindexRtwarn_mismatchedRRR(RRR ((Rtflash_open_paren_eventFs

	
cCs+|io|iidƒd|_ndS(Ntparen(RRRt
tag_deleteR(RR((Rtcheck_restore_eventOs
cCs&|d|ijo|iƒndS(Ni(ttimer_countRRR%(RR&((Rthandle_restore_timerTscCs|io|iiƒndS(N(RtBELLRR(R((RR!Xs
cCs-|iid|ƒ|iid|iƒdS(s'Highlight the single paren that matchesR#N(RRttag_addR t
tag_configt
HILITE_CONFIG(RR ((RR_scCs0|iid|dƒ|iid|iƒdS(sHighlight the entire expressionR#tinsertN(RRR)R R*R+(RR ((RRdscCsdS(s3Highlight will remain until user input turns it offN((R((RRlscCs9|iii|i||id„ƒ|id|_dS(s7The last highlight created will be removed after .5 seccCs
|i|ƒS(N(RR'tc(RR-((Rt<lambda>usiN(RR
t
text_frametaftertFLASH_DELAYR(R((RRps(t__name__t
__module__t__doc__tmenudefstidleConft	GetOptionRR1tGetHighlighttCurrentThemeR+R(RRR"RR%R'R!RRRR(((RRs&										cCsj|djp
|djodSn|djp
|djodSn|djp
|djod	SndS(
Nt
parenrightt(R#tbracketrightt[tbrackett
bracerightt{tbrace(tks(RB((RRysR
cBsPtZeiZeiZeiZeiZd„Zd„Zd„Z	d„Z
RS(NcCs||_|i|_dS(N(R
RR(RR
((RR‰s	c	Csãti|i|iƒ}x›|iD]}t||dƒ}t|ƒd}|i
i|dƒd d}|i|ƒ|i|i|i|ƒƒ}|dj	p
|djoPq"q"W|i|pdƒ|iƒ}||ifS(Nis.0R,iÿÿÿÿs
i(tPyParsetParserRtindentwidthttabwidthtytnum_context_linestcontexttmaxtlnotstartattreprtstartatindexRtgettrawtexttset_strtfind_good_parse_starttcontext_use_ps1t_build_char_in_string_functbodRtset_lotget_last_open_bracket_postitstr(	RRKRPRLRXRIRGRNRU((Rt_find_offset_in_bufs

	c	Cs©t|iidƒƒ}|i|ƒ\}}|djpt	||ƒ|jodSn||idƒd}|| }|idƒd}||}d|||fS(s*Return the location of the last open parenR,s
is%d.%dN(t
index2lineRRR RKRZRXtbufRRtright_keysym_typetcountt
lines_backt	upto_opentrfindtjtoffset(	RR]R_RXRbRKRcR\R`((RR s$

cCs||iid„}|S(NcCs||d|ƒS(Ns%dc(ticist
startindexRc(RcReRd((Rtinner¯s(ReRR
tis_char_in_stringRf(RReRf((RRT®s(R2R3tEditorWindowRHRERFRSRRZRRT(((RR
ƒs							(	R4RCRhR[t
configHandlerR6RRR
(R
R[RCRhR6RR((Rt?s	
h	

Anon7 - 2021