Psyduck - 可達鴨 之 鴨力山大2


Server : LiteSpeed
System : Linux premium217.web-hosting.com 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
User : alloknri ( 880)
PHP Version : 8.1.34
Disable Function : NONE
Directory :  /opt/alt/python36/lib64/python3.6/idlelib/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //opt/alt/python36/lib64/python3.6/idlelib/__pycache__/parenmatch.cpython-36.pyc
3

� f$�@sfdZddlmZddlmZdddd�ZdZGd	d
�d
�Zej�e	dkrbddl
mZed
dd�dS)z�ParenMatch -- 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.
�)�HyperParser)�idleConf�(�[�{)�)�]�}�dc@s�eZdZdZdZd%Zdd�Zed	d
��Zdd�Z	d
d�Z
dd�Zdd�Zdd�Z
d&dd�Zdd�Zdd�Zdd�Zdd�Zeeeed �Zd!d"�Zd#d$�ZdS)'�
ParenMatcha'Highlight matching openers and closers, (), [], and {}.

    There are three supported styles of paren matching.  When a right
    paren (opener) is typed:

    opener -- highlight the matching left paren (closer);
    parens -- highlight the left and right parens (opener and closer);
    expression -- highlight the entire expression from opener to closer.
    (For back compatibility, 'default' is a synonym for 'opener').

    Flash-delay is the maximum milliseconds the highlighting remains.
    Any cursor movement (key press or click) before that removes the
    highlight.  If flash-delay is 0, there is no maximum.

    TODO:
    - Augment bell() with mismatch warning in status window.
    - Highlight when cursor is moved to the right of a closer.
      This might be too expensive to check.
    z<<parenmatch-check-restore>>�
<KeyPress>�
<ButtonPress>�<Key-Return>�<Key-BackSpace>cCs0||_|j|_|jj|j|j�d|_d|_dS)Nr)�editwin�textZbind�RESTORE_VIRTUAL_EVENT_NAME�
restore_event�counter�is_restore_active)�selfr�r�7/opt/alt/python36/lib64/python3.6/idlelib/parenmatch.py�__init__(s
zParenMatch.__init__cCsVtjddddd�|_tjdddddd	�|_tjddd
ddd	�|_tjtj�d
�|_dS)N�
extensionsrZstyle�opener)�defaultzflash-delay�inti�)�typer�bell�bool�Zhilite)rZ	GetOption�STYLE�FLASH_DELAY�BELLZGetHighlightZCurrentTheme�
HILITE_CONFIG)�clsrrr�reload3s
zParenMatch.reloadcCs0|js,x|jD]}|jj|j|�qWd|_dS)z5Activate mechanism to restore text from highlighting.TN)r�RESTORE_SEQUENCESrZ	event_addr)r�seqrrr�activate_restore>szParenMatch.activate_restorecCs0|jr,x|jD]}|jj|j|�qWd|_dS)zRemove restore event bindings.FN)rr(rZevent_deleter)rr)rrr�deactivate_restoreEszParenMatch.deactivate_restorecCst|jd�j�}|j|�dS)zAHandle editor 'show surrounding parens' event (menu or shortcut).�insert�break)rr�get_surrounding_brackets�finish_paren_event)r�event�indicesrrr�flash_paren_eventLs
zParenMatch.flash_paren_eventcCsN|jjd�}|tkrdSt|jd�}|j�s0dS|jt|d�}|j|�dS)zHandle user input of closer.z	insert-1cNT)r�get�_openersrrZ
is_in_coder.r/)rr0ZcloserZhpr1rrr�paren_closed_eventSs
zParenMatch.paren_closed_eventcCsT|dkr|jr|jj�dS|j�|jj|j|j�||�|jrH|j	n|j
�dS)N)r$rrr*�tagfuncsr3r"�create_tag_expressionr#�set_timeout_last�set_timeout_none)rr1rrrr/`s
zParenMatch.finish_paren_eventNcCs&|jjd�|j�|jd7_dS)zRemove effect of doing match.�parenr!N)rZ
tag_deleter+r)rr0rrrrkszParenMatch.restore_eventcCs||jkr|j�dS)N)rr)rZtimer_countrrr�handle_restore_timerqs
zParenMatch.handle_restore_timercCs&|jjd|d�|jjd|j�dS)z'Highlight the single paren that matchesr:rN)r�tag_add�
tag_configr%)rr1rrr�create_tag_openerxszParenMatch.create_tag_openercCsb|jj|d�d
kr"|dd}n|d}|jjd|d|dd|d|�|jjd|j�d	S)z#Highlight the left and right parensr!rrr	z+1cr:rz-1cN)rrr	)rr3r<r=r%)rr1�
rightindexrrr�create_tag_parens}s
$zParenMatch.create_tag_parenscCsR|jj|d�d	kr"|dd}n|d}|jjd|d|�|jjd|j�dS)
zHighlight the entire expressionr!rrr	z+1cr:rN)rrr	)rr3r<r=r%)rr1r?rrrr7�s
z ParenMatch.create_tag_expression)rrZparensZ
expressioncCs>|jd7_||j|jjd�fdd�}|jjjt||�dS)zSHighlight will remain until user input turns it off
        or the insert has movedr!r,cSs2||jjd�kr|j|�n|jjjt||�dS)Nr,)r�indexr;r�
text_frame�after�CHECK_DELAY)�callmer�crArrrrE�sz+ParenMatch.set_timeout_none.<locals>.callmeN)rrrArrBrCrD)rrErrrr9�szParenMatch.set_timeout_nonecCs0|jd7_|jjj|j||jfdd��dS)zFThe last highlight created will be removed after FLASH_DELAY millisecsr!cSs
|j|�S)N)r;)rrFrrr�<lambda>�sz-ParenMatch.set_timeout_last.<locals>.<lambda>N)rrrBrCr#)rrrrr8�szParenMatch.set_timeout_last)rr
rr)N)�__name__�
__module__�__qualname__�__doc__rr(r�classmethodr'r*r+r2r5r/rr;r>r@r7r6r9r8rrrrr
s,

	
r�__main__)�mainz!idlelib.idle_test.test_parenmatch�)�	verbosityN)rKZidlelib.hyperparserrZidlelib.configrr4rDrr'rHZunittestrNrrrr�<module>s&
Name
Size
Permissions
Options
__init__.cpython-36.opt-1.pyc
0.497 KB
-rw-r--r--
__init__.cpython-36.opt-2.pyc
0.136 KB
-rw-r--r--
__init__.cpython-36.pyc
0.497 KB
-rw-r--r--
__main__.cpython-36.opt-1.pyc
0.264 KB
-rw-r--r--
__main__.cpython-36.opt-2.pyc
0.187 KB
-rw-r--r--
__main__.cpython-36.pyc
0.264 KB
-rw-r--r--
_pyclbr.cpython-36.opt-1.pyc
10.183 KB
-rw-r--r--
_pyclbr.cpython-36.opt-2.pyc
6.651 KB
-rw-r--r--
_pyclbr.cpython-36.pyc
10.183 KB
-rw-r--r--
autocomplete.cpython-36.opt-1.pyc
7.022 KB
-rw-r--r--
autocomplete.cpython-36.opt-2.pyc
5.429 KB
-rw-r--r--
autocomplete.cpython-36.pyc
7.022 KB
-rw-r--r--
autocomplete_w.cpython-36.opt-1.pyc
10.808 KB
-rw-r--r--
autocomplete_w.cpython-36.opt-2.pyc
10.073 KB
-rw-r--r--
autocomplete_w.cpython-36.pyc
10.854 KB
-rw-r--r--
autoexpand.cpython-36.opt-1.pyc
2.76 KB
-rw-r--r--
autoexpand.cpython-36.opt-2.pyc
2.02 KB
-rw-r--r--
autoexpand.cpython-36.pyc
2.76 KB
-rw-r--r--
browser.cpython-36.opt-1.pyc
9.349 KB
-rw-r--r--
browser.cpython-36.opt-2.pyc
6.823 KB
-rw-r--r--
browser.cpython-36.pyc
9.349 KB
-rw-r--r--
calltip.cpython-36.opt-1.pyc
5.479 KB
-rw-r--r--
calltip.cpython-36.opt-2.pyc
3.888 KB
-rw-r--r--
calltip.cpython-36.pyc
5.479 KB
-rw-r--r--
calltip_w.cpython-36.opt-1.pyc
6.019 KB
-rw-r--r--
calltip_w.cpython-36.opt-2.pyc
5.1 KB
-rw-r--r--
calltip_w.cpython-36.pyc
6.019 KB
-rw-r--r--
codecontext.cpython-36.opt-1.pyc
7.956 KB
-rw-r--r--
codecontext.cpython-36.opt-2.pyc
5.036 KB
-rw-r--r--
codecontext.cpython-36.pyc
7.99 KB
-rw-r--r--
colorizer.cpython-36.opt-1.pyc
8.166 KB
-rw-r--r--
colorizer.cpython-36.opt-2.pyc
8.003 KB
-rw-r--r--
colorizer.cpython-36.pyc
8.166 KB
-rw-r--r--
config.cpython-36.opt-1.pyc
29.792 KB
-rw-r--r--
config.cpython-36.opt-2.pyc
19.848 KB
-rw-r--r--
config.cpython-36.pyc
29.792 KB
-rw-r--r--
config_key.cpython-36.opt-1.pyc
13.523 KB
-rw-r--r--
config_key.cpython-36.opt-2.pyc
12.474 KB
-rw-r--r--
config_key.cpython-36.pyc
13.523 KB
-rw-r--r--
configdialog.cpython-36.opt-1.pyc
75.717 KB
-rw-r--r--
configdialog.cpython-36.opt-2.pyc
46.642 KB
-rw-r--r--
configdialog.cpython-36.pyc
75.717 KB
-rw-r--r--
debugger.cpython-36.opt-1.pyc
13.886 KB
-rw-r--r--
debugger.cpython-36.opt-2.pyc
13.73 KB
-rw-r--r--
debugger.cpython-36.pyc
13.886 KB
-rw-r--r--
debugger_r.cpython-36.opt-1.pyc
13.444 KB
-rw-r--r--
debugger_r.cpython-36.opt-2.pyc
11.102 KB
-rw-r--r--
debugger_r.cpython-36.pyc
13.567 KB
-rw-r--r--
debugobj.cpython-36.opt-1.pyc
5.052 KB
-rw-r--r--
debugobj.cpython-36.opt-2.pyc
5.044 KB
-rw-r--r--
debugobj.cpython-36.pyc
5.052 KB
-rw-r--r--
debugobj_r.cpython-36.opt-1.pyc
1.962 KB
-rw-r--r--
debugobj_r.cpython-36.opt-2.pyc
1.954 KB
-rw-r--r--
debugobj_r.cpython-36.pyc
1.962 KB
-rw-r--r--
delegator.cpython-36.opt-1.pyc
1.246 KB
-rw-r--r--
delegator.cpython-36.opt-2.pyc
1.141 KB
-rw-r--r--
delegator.cpython-36.pyc
1.246 KB
-rw-r--r--
dynoption.cpython-36.opt-1.pyc
2.233 KB
-rw-r--r--
dynoption.cpython-36.opt-2.pyc
1.854 KB
-rw-r--r--
dynoption.cpython-36.pyc
2.233 KB
-rw-r--r--
editor.cpython-36.opt-1.pyc
47.286 KB
-rw-r--r--
editor.cpython-36.opt-2.pyc
45.666 KB
-rw-r--r--
editor.cpython-36.pyc
47.371 KB
-rw-r--r--
filelist.cpython-36.opt-1.pyc
3.293 KB
-rw-r--r--
filelist.cpython-36.opt-2.pyc
3.253 KB
-rw-r--r--
filelist.cpython-36.pyc
3.318 KB
-rw-r--r--
grep.cpython-36.opt-1.pyc
6.595 KB
-rw-r--r--
grep.cpython-36.opt-2.pyc
4.789 KB
-rw-r--r--
grep.cpython-36.pyc
6.595 KB
-rw-r--r--
help.cpython-36.opt-1.pyc
10.048 KB
-rw-r--r--
help.cpython-36.opt-2.pyc
7.372 KB
-rw-r--r--
help.cpython-36.pyc
10.048 KB
-rw-r--r--
help_about.cpython-36.opt-1.pyc
7.249 KB
-rw-r--r--
help_about.cpython-36.opt-2.pyc
6.146 KB
-rw-r--r--
help_about.cpython-36.pyc
7.249 KB
-rw-r--r--
history.cpython-36.opt-1.pyc
3.317 KB
-rw-r--r--
history.cpython-36.opt-2.pyc
2.113 KB
-rw-r--r--
history.cpython-36.pyc
3.317 KB
-rw-r--r--
hyperparser.cpython-36.opt-1.pyc
6.619 KB
-rw-r--r--
hyperparser.cpython-36.opt-2.pyc
5.335 KB
-rw-r--r--
hyperparser.cpython-36.pyc
6.619 KB
-rw-r--r--
idle.cpython-36.opt-1.pyc
0.327 KB
-rw-r--r--
idle.cpython-36.opt-2.pyc
0.319 KB
-rw-r--r--
idle.cpython-36.pyc
0.327 KB
-rw-r--r--
iomenu.cpython-36.opt-1.pyc
13.449 KB
-rw-r--r--
iomenu.cpython-36.opt-2.pyc
13.031 KB
-rw-r--r--
iomenu.cpython-36.pyc
13.449 KB
-rw-r--r--
macosx.cpython-36.opt-1.pyc
7.432 KB
-rw-r--r--
macosx.cpython-36.opt-2.pyc
5.293 KB
-rw-r--r--
macosx.cpython-36.pyc
7.432 KB
-rw-r--r--
mainmenu.cpython-36.opt-1.pyc
3.717 KB
-rw-r--r--
mainmenu.cpython-36.opt-2.pyc
3.249 KB
-rw-r--r--
mainmenu.cpython-36.pyc
3.717 KB
-rw-r--r--
multicall.cpython-36.opt-1.pyc
14.943 KB
-rw-r--r--
multicall.cpython-36.opt-2.pyc
12.626 KB
-rw-r--r--
multicall.cpython-36.pyc
14.999 KB
-rw-r--r--
outwin.cpython-36.opt-1.pyc
5.977 KB
-rw-r--r--
outwin.cpython-36.opt-2.pyc
4.324 KB
-rw-r--r--
outwin.cpython-36.pyc
5.977 KB
-rw-r--r--
paragraph.cpython-36.opt-1.pyc
5.801 KB
-rw-r--r--
paragraph.cpython-36.opt-2.pyc
3.954 KB
-rw-r--r--
paragraph.cpython-36.pyc
5.801 KB
-rw-r--r--
parenmatch.cpython-36.opt-1.pyc
6.232 KB
-rw-r--r--
parenmatch.cpython-36.opt-2.pyc
4.715 KB
-rw-r--r--
parenmatch.cpython-36.pyc
6.232 KB
-rw-r--r--
pathbrowser.cpython-36.opt-1.pyc
3.656 KB
-rw-r--r--
pathbrowser.cpython-36.opt-2.pyc
3.511 KB
-rw-r--r--
pathbrowser.cpython-36.pyc
3.656 KB
-rw-r--r--
percolator.cpython-36.opt-1.pyc
3.43 KB
-rw-r--r--
percolator.cpython-36.opt-2.pyc
3.422 KB
-rw-r--r--
percolator.cpython-36.pyc
3.564 KB
-rw-r--r--
pyparse.cpython-36.opt-1.pyc
11.4 KB
-rw-r--r--
pyparse.cpython-36.opt-2.pyc
7.896 KB
-rw-r--r--
pyparse.cpython-36.pyc
11.755 KB
-rw-r--r--
pyshell.cpython-36.opt-1.pyc
41.726 KB
-rw-r--r--
pyshell.cpython-36.opt-2.pyc
39.235 KB
-rw-r--r--
pyshell.cpython-36.pyc
41.846 KB
-rw-r--r--
query.cpython-36.opt-1.pyc
10.188 KB
-rw-r--r--
query.cpython-36.opt-2.pyc
8.106 KB
-rw-r--r--
query.cpython-36.pyc
10.188 KB
-rw-r--r--
redirector.cpython-36.opt-1.pyc
6.601 KB
-rw-r--r--
redirector.cpython-36.opt-2.pyc
3.241 KB
-rw-r--r--
redirector.cpython-36.pyc
6.601 KB
-rw-r--r--
replace.cpython-36.opt-1.pyc
6.917 KB
-rw-r--r--
replace.cpython-36.opt-2.pyc
6.274 KB
-rw-r--r--
replace.cpython-36.pyc
6.917 KB
-rw-r--r--
rpc.cpython-36.opt-1.pyc
19.1 KB
-rw-r--r--
rpc.cpython-36.opt-2.pyc
15.629 KB
-rw-r--r--
rpc.cpython-36.pyc
19.185 KB
-rw-r--r--
rstrip.cpython-36.opt-1.pyc
1.051 KB
-rw-r--r--
rstrip.cpython-36.opt-2.pyc
0.967 KB
-rw-r--r--
rstrip.cpython-36.pyc
1.051 KB
-rw-r--r--
run.cpython-36.opt-1.pyc
14.985 KB
-rw-r--r--
run.cpython-36.opt-2.pyc
13.004 KB
-rw-r--r--
run.cpython-36.pyc
15.027 KB
-rw-r--r--
runscript.cpython-36.opt-1.pyc
6.326 KB
-rw-r--r--
runscript.cpython-36.opt-2.pyc
5.146 KB
-rw-r--r--
runscript.cpython-36.pyc
6.326 KB
-rw-r--r--
scrolledlist.cpython-36.opt-1.pyc
5.259 KB
-rw-r--r--
scrolledlist.cpython-36.opt-2.pyc
5.251 KB
-rw-r--r--
scrolledlist.cpython-36.pyc
5.259 KB
-rw-r--r--
search.cpython-36.opt-1.pyc
3.458 KB
-rw-r--r--
search.cpython-36.opt-2.pyc
3.204 KB
-rw-r--r--
search.cpython-36.pyc
3.458 KB
-rw-r--r--
searchbase.cpython-36.opt-1.pyc
7.79 KB
-rw-r--r--
searchbase.cpython-36.opt-2.pyc
5.087 KB
-rw-r--r--
searchbase.cpython-36.pyc
7.79 KB
-rw-r--r--
searchengine.cpython-36.opt-1.pyc
6.68 KB
-rw-r--r--
searchengine.cpython-36.opt-2.pyc
5.061 KB
-rw-r--r--
searchengine.cpython-36.pyc
6.68 KB
-rw-r--r--
squeezer.cpython-36.opt-1.pyc
9.675 KB
-rw-r--r--
squeezer.cpython-36.opt-2.pyc
6.556 KB
-rw-r--r--
squeezer.cpython-36.pyc
9.711 KB
-rw-r--r--
stackviewer.cpython-36.opt-1.pyc
4.937 KB
-rw-r--r--
stackviewer.cpython-36.opt-2.pyc
4.929 KB
-rw-r--r--
stackviewer.cpython-36.pyc
4.937 KB
-rw-r--r--
statusbar.cpython-36.opt-1.pyc
1.899 KB
-rw-r--r--
statusbar.cpython-36.opt-2.pyc
1.892 KB
-rw-r--r--
statusbar.cpython-36.pyc
1.899 KB
-rw-r--r--
textview.cpython-36.opt-1.pyc
6.286 KB
-rw-r--r--
textview.cpython-36.opt-2.pyc
4.742 KB
-rw-r--r--
textview.cpython-36.pyc
6.286 KB
-rw-r--r--
tooltip.cpython-36.opt-1.pyc
6.412 KB
-rw-r--r--
tooltip.cpython-36.opt-2.pyc
4.82 KB
-rw-r--r--
tooltip.cpython-36.pyc
6.412 KB
-rw-r--r--
tree.cpython-36.opt-1.pyc
13.941 KB
-rw-r--r--
tree.cpython-36.opt-2.pyc
13.179 KB
-rw-r--r--
tree.cpython-36.pyc
13.941 KB
-rw-r--r--
undo.cpython-36.opt-1.pyc
10.527 KB
-rw-r--r--
undo.cpython-36.opt-2.pyc
10.52 KB
-rw-r--r--
undo.cpython-36.pyc
10.527 KB
-rw-r--r--
window.cpython-36.opt-1.pyc
3.082 KB
-rw-r--r--
window.cpython-36.opt-2.pyc
3.074 KB
-rw-r--r--
window.cpython-36.pyc
3.082 KB
-rw-r--r--
zoomheight.cpython-36.opt-1.pyc
1.369 KB
-rw-r--r--
zoomheight.cpython-36.opt-2.pyc
1.313 KB
-rw-r--r--
zoomheight.cpython-36.pyc
1.369 KB
-rw-r--r--
zzdummy.cpython-36.opt-1.pyc
1.178 KB
-rw-r--r--
zzdummy.cpython-36.opt-2.pyc
1.104 KB
-rw-r--r--
zzdummy.cpython-36.pyc
1.178 KB
-rw-r--r--