HEX

Warning: set_time_limit() [function.set-time-limit]: Cannot set time limit - prohibited by configuration in /home/u547966/brikov.ru/www/wp-content/plugins/admin-menu-editor/menu-editor.php on line 745
Server: Apache
System: Linux 4.19.0-0.bpo.9-amd64 x86_64 at red40
User: u547966 (5490)
PHP: 5.3.29-mh2
Disabled: syslog, dl, popen, proc_open, proc_nice, proc_get_status, proc_close, proc_terminate, posix_mkfifo, chown, chgrp, accelerator_reset, opcache_reset, accelerator_get_status, opcache_get_status, pcntl_alarm, pcntl_fork, pcntl_waitpid, pcntl_wait, pcntl_wifexited, pcntl_wifstopped, pcntl_wifsignaled, pcntl_wifcontinued, pcntl_wexitstatus, pcntl_wtermsig, pcntl_wstopsig, pcntl_signal, pcntl_signal_dispatch, pcntl_get_last_error, pcntl_strerror, pcntl_sigprocmask, pcntl_sigwaitinfo, pcntl_sigtimedwait, pcntl_exec, pcntl_getpriority, pcntl_setpriority
Upload Files
File: //usr/lib/python3.5/idlelib/__pycache__/AutoCompleteWindow.cpython-35.pyc


FaKE
@sdZddlTddlmZddlmZmZdZdZdZ	dZ
dZdZdZ
dZdZGdddZdS)zH
An auto-completion window for IDLE, used by the AutoComplete extension
)*)MC_SHIFT)COMPLETE_FILESCOMPLETE_ATTRIBUTESz<<autocompletewindow-hide>>
<FocusOut>
<ButtonPress>z<<autocompletewindow-keypress>><Key><Key-BackSpace><Key-Return>	<Key-Tab><Key-Up>
<Key-Down>
<Key-Home>	<Key-End><Key-Prior>
<Key-Next>z!<<autocompletewindow-keyrelease>>z<KeyRelease>z<B1-ButtonRelease>z<Configure>z<B1-Double-ButtonRelease>c@seZdZddZddZddZddZd	d
ZddZd
dZ	ddZ
ddZddZddZ
ddZddZddZddZdS) AutoCompleteWindowcCs||_d|_|_|_d|_|_d|_d|_d|_d|_	d|_
d|_d|_d|_
|_|_|_|_|_d|_dS)NF)widgetautocompletewindowlistbox	scrollbarorigselforegroundorigselbackgroundcompletionsmorecompletionsmodestart
startindexlasttypedstartuserwantswindowhideid
keypressidlistupdateidwinconfigidkeyreleaseid
doubleclickidlastkey_was_tab)selfrr(0/usr/lib/python3.5/idlelib/AutoCompleteWindow.py__init__s								,zAutoCompleteWindow.__init__cCstt|jt|}d}x1||krW|j|||krW|d7}q'W|t|jkr|jjd|j|fd|jt|jf|t|kr|jjd|j|f||d||_dS)Nrz%s+%dc)minlenrrdeleterinsert)r'newstartmin_lenir(r(r)
_change_start8s&z AutoCompleteWindow._change_startcCsvd}t|j}xD||kr[||d}|j||krN|}q|d}qWt|t|jdS)zFind the first index in self.completions where completions[i] is
        greater or equal to s, or the last index if there is no such
        one.rr+)r-rr,)r'sr2jmr(r(r)_binary_searchEs	z!AutoCompleteWindow._binary_searchc
CsG|j|}|j|dt||kr6|S|d}t|j}xT||kr||d}|j|dt||kr|}qR|d}qRW|d}||kr|j|S|j|}|j|}tt|t|}	t|}x.||	kr8||||kr8|d7}qW|d|S)zAssuming that s is the prefix of a string in self.completions,
        return the longest string which is a prefix of all the strings which
        s is a prefix of them. If s is not a prefix of a string, return s.Nr+r4)r8rr-r,)
r'r5firstr2r6r7ZlastZ
first_compZ	last_compr1r(r(r)_complete_stringRs(#
#	


#z#AutoCompleteWindow._complete_stringcCst|jjd}|jj||j}|j|}|j||kr]|}nbtt|t|}d}x.||kr||||kr|d7}qW|d|}|j	||j|dt|j
|j
kr|jjd|jd|j
n|jjd|jjdd|jjd|jr|j|_d|_|jjdtx$|jD]}|jjt|qW|jj|j|j
|jdS)z|Should be called when the selection of the Listbox has changed.
        Updates the Listbox display and calls _change_start.rr+NselectbackgroundselectforegroundbgZfg)intrcurselectionseerrr8r,r-r3rZ	configurerrcgetrr.ENDr/
select_set_selection_changed)r'curselZltsZselstartr0r1r2itemr(r(r)rDqs2	
	#
)
		z%AutoCompleteWindow._selection_changedcCsX|\|_|_||_|jj||_|jj|jd|_|r|j|j}|j}|j	||j
|}|j||kr|t|jdks|j|ddt||kr||kS||_|j|_
t|j|_}	|	jd|	jdy#|	jjdd|	jddWntk
raYnXt|	d	t|_}
t|	d
|
jddd
d|_}x!|jD]}|jt|qW|jd|_|jd|_ |
j!d|j"|
j#dt$dt%|j#dt&dt'dd|	j(|jj)|j
|j|j*|jj+t,|j-|_.x!t/D]}
|jj0t,|
qW|jj+t1|j2|_3x!t4D]}
|jj0t1|
qW|jj+t5|j6|_7|jj0t5t8|j+t9|j:|_;|	j+t<|j=|_>|j+t?|j@|_AdS)zShow the autocomplete list, bind events.
        If complete is True, complete the text, and if there is exactly one
        matching completion, don't open a list.r/r+Nz+10000+10000z!::tk::unsupported::MacWindowStyleZstylehelpZnoActivatesZorientZyscrollcommandZexportselectionFr=Zwhiter<r;ZcommandZsideZfillexpandT)Brrrrindexrgetrr:r3r8r-rrZToplevelrwm_geometryZwm_overrideredirectZtkZcallZ_wZTclErrorZ	ScrollbarZVERTICALrZListboxsetrr/rBrArrZconfigZyviewZpackZRIGHTYZLEFTZBOTHZliftrCrDZbindHIDE_VIRTUAL_EVENT_NAME
hide_eventr HIDE_SEQUENCESZ	event_addKEYPRESS_VIRTUAL_EVENT_NAMEkeypress_eventr!KEYPRESS_SEQUENCESKEYRELEASE_VIRTUAL_EVENT_NAMEkeyrelease_eventr$KEYRELEASE_SEQUENCELISTUPDATE_SEQUENCElistselect_eventr"WINCONFIG_SEQUENCEwinconfig_eventr#DOUBLECLICK_SEQUENCEdoubleclick_eventr%)r'Z
comp_listsrIcompleterZuserWantsWinZ	completedrr2acwrrrFseqr(r(r)show_windowsh		
'
	






		zAutoCompleteWindow.show_windowcCs
|jsdS|j}|j|j|j|j\}}}}|j}|j|j}}	|j|j}
}|jt	|t
d|
|}|j|}
||||	ks||	kr|
|7}
n
|
|	8}
|jd||
fdS)Nrz+%d+%d)
	is_activerr@rZbboxrZwinfo_widthwinfo_heightZwinfo_rootxr,maxZwinfo_rootyrK)r'eventtextxyZcxZcyr^Z	acw_widthZ
acw_heightZ
text_widthZtext_heightZnew_xZnew_yr(r(r)rZs		&

z"AutoCompleteWindow.winconfig_eventcCs|jsdS|jdS)N)rahide_window)r'rdr(r(r)rOszAutoCompleteWindow.hide_eventcCsJ|jsdSd|_t|jjd}|j|j|dS)NTr)rarr>rr?r3r)r'rdrEr(r(r)rXs
	z#AutoCompleteWindow.listselect_eventcCs;t|jjd}|j|j||jdS)Nr)r>rr?r3rrh)r'rdrEr(r(r)r\sz$AutoCompleteWindow.doubleclick_eventcsW|jsdS|jt|dr4|j}nd}dkrOd|_tdksd(ks|jtkrd)kr|t@rtdkr|j	|j
ndkr|j	|j
d
ndkr|j	|j
dn`d	kr&|j	|j
dn=t|j
dkrI|jdS|j	|j
dd*|j
|_|j
jdt|j
jd|j
j|j|j
|jd
Sdkr|jdS|jtkrd+ks|jtkrd,kr|t@rt|j
jd}|j|dt|j
|j
kr|jtksu|j
r|j	|j||jdSd-kr'|r'd|_t|j
jd}dkrd}ndkrt|jd}nd.kr|j
j|j
j|j
jd}dkr\td||}qdksnttt|jd||}nTdkrtd|d}n2dksttt|jd|d}|j
j||j
j||j|j	|j|d
Sdkr|r|jr~t|j
jd}|j	|j||jd
Sd|_d|_dSntfdd d/DrdS|jrE|jd'krE|j	|j
|j|j
|_|j
jdt|j
jd|j
j|j|j
|jd
S|jdSdS)0Nmc_staterZTabFr+
underscore	BackSpaceperiodminus_.-breakZReturnspace	parenleft
parenrightbracketleftbracketrightslash	backslashquotedbl
apostropheHomeEndPriorNextUpDownTc3s|]}|kVqdS)Nr().0r5)keysymr(r)	<genexpr>bsz4AutoCompleteWindow.keypress_event.<locals>.<genexpr>ShiftControlAltMetaCommandOption )rjrk)rlrm)rlrrrsrtrurv)rwrxryrz)r{r|r}r~rr)r}r~)rrrrrr)rarhasattrrir&r-rrrr3rrhrrZselect_clearr>r?rCr8rDrrrZnearestrbrcAssertionErrorr,anychar)r'rdstaterEZnewselZjumpr()rr)rRs			
&

		)
		# 
	
		
&

z!AutoCompleteWindow.keypress_eventcCsX|jsdS|jjd|jjd|jt|jfkrT|jdS)Nr/z%s+%dc)rarrIrr-rrh)r'rdr(r(r)rUus
+z#AutoCompleteWindow.keyrelease_eventcCs
|jdk	S)N)r)r'r(r(r)ra}szAutoCompleteWindow.is_activecCs|j|j|jdS)N)r3r:r)r'r(r(r)r]szAutoCompleteWindow.completecCsL|jsdSx!tD]}|jjt|qW|jjt|jd|_x!tD]}|jjt|qZW|jjt|j	d|_	|jjt
t|jjt
|jd|_|j
jt|jd|_|jjt|jd|_|jjd|_|j
jd|_
|jjd|_dS)N)rarPrZevent_deleterNZunbindr rSrQr!rTrVr$rrWr"rrYr#rZdestroy)r'r_r(r(r)rhs0
	
				
	
	
zAutoCompleteWindow.hide_windowN)__name__
__module____qualname__r*r3r8r:rDr`rZrOrXr\rRrUrar]rhr(r(r(r)rs 

$FsrN)rr)
rr	r
rrr
rrrr)__doc__ZtkinterZidlelib.MultiCallrZidlelib.AutoCompleterrrNrPrQrSrTrVrWrYr[rr(r(r(r)<module>s