Prv8 Shell
Server : Apache/2.2.22 (Unix) mod_ssl/2.2.22 OpenSSL/1.0.0-fips mod_auth_passthrough/2.1 mod_bwlimited/1.4
System : Linux server.jackjohnson.com 2.6.32-279.5.2.el6.x86_64 #1 SMP Fri Aug 24 01:07:11 UTC 2012 x86_64
User : jackjohn ( 502)
PHP Version : 5.3.17
Disable Function : NONE
Directory :  /usr/lib64/python2.6/idlelib/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/lib64/python2.6/idlelib/CodeContext.pyo
Ńň
§ÚęLc@sËdZddkZddklZlZlZlZlZddkZddk	l
Zddkl
Z
edddd	d
ddd
dddgƒZdZdZeidƒd„Zddd„ƒYZdS(sICodeContext - Extension to display the block context above the edit window

Once code has scrolled off the top of a window, it can be difficult to
determine which block you are in.  This extension implements a pane at the top
of each IDLE edit window which provides block structure hints.  These hints are
the lines which contain the block opening keywords, e.g. 'if', for the
enclosing block.  The number of hint lines is determined by the numlines
variable in the CodeContext section of config-extensions.def. Lines which do
not open blocks are not shown in the context hints pane.

i˙˙˙˙N(tTOPtLEFTtXtWtSUNKEN(tmaxint(tidleConftclasstdefteliftelsetexcepttfinallytfortifttrytwhiletwithidičs^(\s*)(\w*)cCs|i|ƒiƒS((tmatchtgroups(tstc((s+/usr/lib64/python2.6/idlelib/CodeContext.pyt<lambda>stCodeContextcBsĹeZddgfgZeiddddddd	ƒZeiddd
ddddƒZeiddd
ddddƒZd„Zdd„Z
d„Zddd„Zd„Z
d„Zd„ZRS(toptionss!Code Conte_xts<<toggle-code-context>>t
extensionsRtnumlinesttypetinttdefaultitbgcolortstrt	LightGraytfgcolortBlackcCsČ||_|i|_|id|_d|_dddtfg|_d|_ti	dddd	d
dtƒ}|o!|i
ƒ|iidtƒn|ii
t|iƒ|ii
t|iƒdS(
Ntfontii˙˙˙˙tiRRtvisibleRtboolRs<<toggle-code-context>>(teditwinttextttextfonttNonetlabeltFalsetinfot
topvisibleRt	GetOptionttoggle_code_context_eventtsetvartTruetaftertUPDATEINTERVALttimer_eventtFONTUPDATEINTERVALtfont_timer_event(tselfR'R%((s+/usr/lib64/python2.6/idlelib/CodeContext.pyt__init__"s			
cCsŽ|ip;|ii|iif}d}xM|D]E}|tt|iƒdƒƒ7}|tt|idƒƒƒ7}q/Wd}x-|D]%}|tt|idƒƒƒ7}q…Wti	|ii
dd|iddtdt
d	|id
|id|iddd|d|d
tƒ
|_|iidtdtdtd|iiƒn|iiƒd|_tidddt|idj	ƒƒtiƒdS(NitpadxtborderR(s
itanchortjustifyR#tbgtfgtwidthtrelieftsidetfilltexpandtbeforeRRR%(R+R'R(t
text_frameRRt	pack_infotcgettTkintertLabelttopt
context_depthRRR)RR!RtpackRRR,tdestroyR*Rt	SetOptiontSaveUserCfgFiles(R8teventtwidgetsR:twidgetR;((s+/usr/lib64/python2.6/idlelib/CodeContext.pyR07s4
 ##	
	cCs•|iid|d|ƒ}t|ƒ\}}|tjo|}t|ƒt|ƒjp|t|ƒdjo
t}n
t|ƒ}|||fS(sÖGet the line indent value, text, and any block start keyword

        If the line does not start a block, the keyword value is False.
        The indentation of empty lines (or comment lines) is INFINITY.

        s%d.0s%d.endt#(R(tgettgetspacesfirstwordtBLOCKOPENERStlentINFINITY(R8tlinenumR(tspacest	firstwordtopenertindent((s+/usr/lib64/python2.6/idlelib/CodeContext.pyt
get_line_info[s0
iic
CsŰg}t}x¸t||ddƒD] }|i|ƒ\}}}	||jou|}|	djo|d7}n|	o7||jo*||jo|i||||	fƒn||joPqĂq#q#W|iƒ||fS(säGet context lines, starting at new_topvisible and working backwards.

        Stop when stopline or stopindent is reached. Return a tuple of context
        data and the indent level at the top of the region inspected.

        ii˙˙˙˙R
R	(R
R	(RYtxrangeR_tappendtreverse(
R8tnew_topvisibletstoplinet
stopindenttlinest
lastindentRZR^R(R]((s+/usr/lib64/python2.6/idlelib/CodeContext.pytget_contextks

!


cCsŽt|iidƒidƒdƒ}|i|jodS|i|joI|i||iƒ\}}xš|idd|jo|id=qhWn|i|jo~|iddd}x8|idd|jo|idd}|id=qťW|i||iddd|ƒ\}}n|ii|ƒ||_dgtd|i	t
|iƒƒ}|g}|i|i	D]}||dqy~7}d	i|ƒ|id
<dS(sKUpdate context information and lines visible in the context pane.

        s@0,0t.iNi˙˙˙˙iR$is
R((
RR(tindextsplitR.RhR-textendtmaxRLRXtjoinR+(R8RcRfRgRetcontext_stringst_[1]tx((s+/usr/lib64/python2.6/idlelib/CodeContext.pytupdate_code_context†s.%			&4cCs2|io|iƒn|iit|iƒdS(N(R+RrR(R3R4R5(R8((s+/usr/lib64/python2.6/idlelib/CodeContext.pyR5Śs
cCs^|id}|io-||ijo||_|i|id<n|iit|iƒdS(NR#(R(R+R)R3R6R7(R8tnewtextfont((s+/usr/lib64/python2.6/idlelib/CodeContext.pyR7Ťs

	(s!Code Conte_xts<<toggle-code-context>>N(t__name__t
__module__tmenudefsRR/RLRR!R9R*R0R_RhRrR5R7(((s+/usr/lib64/python2.6/idlelib/CodeContext.pyRs	$		 	((t__doc__RItTkconstantsRRRRRtretsysRRYtidlelib.configHandlerRtsetRWR4R6tcompileRVR(((s+/usr/lib64/python2.6/idlelib/CodeContext.pyt<module>s(

haha - 2025