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/python35/lib64/python3.5/idlelib/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //opt/alt/python35/lib64/python3.5/idlelib/__pycache__/ParenMatch.cpython-35.pyc


��Yf:�@s�dZddlmZddlmZdddddd	iZd
ZGdd�d�Zed
kr�ddl	Z	e	j
ddd�dS)z�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.
�)�HyperParser)�idleConf�)�(�]�[�}�{�dc@sHeZdZdZdd1gfgZejddddd�Zejddd	d
ddd�Zej	ej
�d
�Zejdddd
ddd�ZdZ
d2Zdd�Zdd�Zdd�Zdd�Zdd�Zd d!�Zd"d#d$�Zd%d&�Zd'd(�Zd)d*�Zd+d,�Zd-d.�Zd/d0�Zd"S)3�
ParenMatcha�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:
        - 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.
    Zedit�Show surrounding parens�<<flash-paren>>�
extensions�style�default�
expressionzflash-delay�type�inti�Zhilite�bell�bool�z<<parenmatch-check-restore>>�
<KeyPress>�
<ButtonPress>�<Key-Return>�<Key-BackSpace>cCsT||_|j|_|jj|j|j�d|_d|_|j|j�dS)Nr)	�editwin�textZbind�RESTORE_VIRTUAL_EVENT_NAME�
restore_event�counter�is_restore_active�	set_style�STYLE)�selfr�r$�7/opt/alt/python35/lib64/python3.5/idlelib/ParenMatch.py�__init__;s	
		zParenMatch.__init__cCs@|js<x'|jD]}|jj|j|�qWd|_dS)NT)r �RESTORE_SEQUENCESrZ	event_addr)r#�seqr$r$r%�activate_restoreGs	zParenMatch.activate_restorecCs@|jr<x'|jD]}|jj|j|�qWd|_dS)NF)r r'rZevent_deleter)r#r(r$r$r%�deactivate_restoreMs	zParenMatch.deactivate_restorecCsX||_|dkr0|j|_|j|_n$|dkrT|j|_|j|_dS)Nrr)r"�create_tag_default�
create_tag�set_timeout_last�set_timeout�create_tag_expression�set_timeout_none)r#rr$r$r%r!Ss	zParenMatch.set_stylecCsWt|jd�j�}|dkr2|j�dS|j�|j|�|j�dS)N�insert)rr�get_surrounding_brackets�warn_mismatchedr)r,r-)r#�event�indicesr$r$r%�flash_paren_event\s


zParenMatch.flash_paren_eventcCs�|jjd�}|tkr"dSt|jd�}|j�sDdS|jt|d�}|dkrt|j�dS|j�|j	|�|j
�dS)Nz	insert-1cT)r�get�_openersrrZ
is_in_coder2r3r)r,r.)r#r4ZcloserZhpr5r$r$r%�paren_closed_eventfs


zParenMatch.paren_closed_eventNcCs-|jjd�|j�|jd7_dS)N�parenr)rZ
tag_deleter*r)r#r4r$r$r%rvs
zParenMatch.restore_eventcCs||jkr|j�dS)N)rr)r#Ztimer_countr$r$r%�handle_restore_timer{szParenMatch.handle_restore_timercCs|jr|jj�dS)N)�BELLrr)r#r$r$r%r3s	zParenMatch.warn_mismatchedcCs1|jjd|d�|jjd|j�dS)z'Highlight the single paren that matchesr:rN)r�tag_add�
tag_config�
HILITE_CONFIG)r#r5r$r$r%r+�szParenMatch.create_tag_defaultcCsk|jj|d�d	kr-|dd}n
|d}|jjd|d|�|jjd|j�dS)
zHighlight the entire expressionrrrrz+1cr:rN)rrr)rr7r=r>r?)r#r5Z
rightindexr$r$r%r/�s

z ParenMatch.create_tag_expressioncCsP|jd7_||j|jjd�dd�}|jjjt||�dS)zSHighlight will remain until user input turns it off
        or the insert has movedrr1cSsE||jjd�kr(|j|�n|jjjt||�dS)Nr1)r�indexr;r�
text_frame�after�CHECK_DELAY)�callmer#�cr@r$r$r%rD�sz+ParenMatch.set_timeout_none.<locals>.callmeN)rrr@rrArBrC)r#rDr$r$r%r0�s	zParenMatch.set_timeout_nonecCs;|jd7_|jjj|j||jdd��dS)z7The last highlight created will be removed after .5 secrcSs
|j|�S)N)r;)r#rEr$r$r%�<lambda>�sz-ParenMatch.set_timeout_last.<locals>.<lambda>N)rrrArB�FLASH_DELAY)r#r$r$r%r-�szParenMatch.set_timeout_last)rr
)rrrr)�__name__�
__module__�__qualname__�__doc__ZmenudefsrZ	GetOptionr"rGZGetHighlightZCurrentThemer?r<rr'r&r)r*r!r6r9rr;r3r+r/r0r-r$r$r$r%rs4		
r�__main__Nz!idlelib.idle_test.test_parenmatch�	verbosity�)rKZidlelib.HyperParserrZidlelib.configHandlerrr8rCrrHZunittest�mainr$r$r$r%�<module>s�
Name
Size
Permissions
Options
AutoComplete.cpython-35.opt-1.pyc
7.507 KB
-rw-r--r--
AutoComplete.cpython-35.opt-2.pyc
5.846 KB
-rw-r--r--
AutoComplete.cpython-35.pyc
7.507 KB
-rw-r--r--
AutoCompleteWindow.cpython-35.opt-1.pyc
11.193 KB
-rw-r--r--
AutoCompleteWindow.cpython-35.opt-2.pyc
10.457 KB
-rw-r--r--
AutoCompleteWindow.cpython-35.pyc
11.248 KB
-rw-r--r--
AutoExpand.cpython-35.opt-1.pyc
3.094 KB
-rw-r--r--
AutoExpand.cpython-35.opt-2.pyc
2.322 KB
-rw-r--r--
AutoExpand.cpython-35.pyc
3.094 KB
-rw-r--r--
Bindings.cpython-35.opt-1.pyc
3.149 KB
-rw-r--r--
Bindings.cpython-35.opt-2.pyc
2.68 KB
-rw-r--r--
Bindings.cpython-35.pyc
3.149 KB
-rw-r--r--
CallTipWindow.cpython-35.opt-1.pyc
5.235 KB
-rw-r--r--
CallTipWindow.cpython-35.opt-2.pyc
4.942 KB
-rw-r--r--
CallTipWindow.cpython-35.pyc
5.235 KB
-rw-r--r--
CallTips.cpython-35.opt-1.pyc
5.782 KB
-rw-r--r--
CallTips.cpython-35.opt-2.pyc
4.179 KB
-rw-r--r--
CallTips.cpython-35.pyc
5.782 KB
-rw-r--r--
ClassBrowser.cpython-35.opt-1.pyc
8.354 KB
-rw-r--r--
ClassBrowser.cpython-35.opt-2.pyc
7.873 KB
-rw-r--r--
ClassBrowser.cpython-35.pyc
8.354 KB
-rw-r--r--
CodeContext.cpython-35.opt-1.pyc
5.982 KB
-rw-r--r--
CodeContext.cpython-35.opt-2.pyc
4.873 KB
-rw-r--r--
CodeContext.cpython-35.pyc
6.022 KB
-rw-r--r--
ColorDelegator.cpython-35.opt-1.pyc
8.366 KB
-rw-r--r--
ColorDelegator.cpython-35.opt-2.pyc
8.207 KB
-rw-r--r--
ColorDelegator.cpython-35.pyc
8.366 KB
-rw-r--r--
Debugger.cpython-35.opt-1.pyc
15.211 KB
-rw-r--r--
Debugger.cpython-35.opt-2.pyc
15.056 KB
-rw-r--r--
Debugger.cpython-35.pyc
15.211 KB
-rw-r--r--
Delegator.cpython-35.opt-1.pyc
1.313 KB
-rw-r--r--
Delegator.cpython-35.opt-2.pyc
1.207 KB
-rw-r--r--
Delegator.cpython-35.pyc
1.313 KB
-rw-r--r--
EditorWindow.cpython-35.opt-1.pyc
50.805 KB
-rw-r--r--
EditorWindow.cpython-35.opt-2.pyc
49.552 KB
-rw-r--r--
EditorWindow.cpython-35.pyc
50.898 KB
-rw-r--r--
FileList.cpython-35.opt-1.pyc
3.496 KB
-rw-r--r--
FileList.cpython-35.opt-2.pyc
3.488 KB
-rw-r--r--
FileList.cpython-35.pyc
3.525 KB
-rw-r--r--
FormatParagraph.cpython-35.opt-1.pyc
6.206 KB
-rw-r--r--
FormatParagraph.cpython-35.opt-2.pyc
4.36 KB
-rw-r--r--
FormatParagraph.cpython-35.pyc
6.206 KB
-rw-r--r--
GrepDialog.cpython-35.opt-1.pyc
5.509 KB
-rw-r--r--
GrepDialog.cpython-35.opt-2.pyc
5.501 KB
-rw-r--r--
GrepDialog.cpython-35.pyc
5.509 KB
-rw-r--r--
HyperParser.cpython-35.opt-1.pyc
7.227 KB
-rw-r--r--
HyperParser.cpython-35.opt-2.pyc
5.94 KB
-rw-r--r--
HyperParser.cpython-35.pyc
7.227 KB
-rw-r--r--
IOBinding.cpython-35.opt-1.pyc
14.816 KB
-rw-r--r--
IOBinding.cpython-35.opt-2.pyc
14.398 KB
-rw-r--r--
IOBinding.cpython-35.pyc
14.816 KB
-rw-r--r--
IdleHistory.cpython-35.opt-1.pyc
3.593 KB
-rw-r--r--
IdleHistory.cpython-35.opt-2.pyc
2.385 KB
-rw-r--r--
IdleHistory.cpython-35.pyc
3.593 KB
-rw-r--r--
MultiCall.cpython-35.opt-1.pyc
16.089 KB
-rw-r--r--
MultiCall.cpython-35.opt-2.pyc
13.77 KB
-rw-r--r--
MultiCall.cpython-35.pyc
16.152 KB
-rw-r--r--
MultiStatusBar.cpython-35.opt-1.pyc
1.89 KB
-rw-r--r--
MultiStatusBar.cpython-35.opt-2.pyc
1.882 KB
-rw-r--r--
MultiStatusBar.cpython-35.pyc
1.89 KB
-rw-r--r--
ObjectBrowser.cpython-35.opt-1.pyc
5.383 KB
-rw-r--r--
ObjectBrowser.cpython-35.opt-2.pyc
5.375 KB
-rw-r--r--
ObjectBrowser.cpython-35.pyc
5.383 KB
-rw-r--r--
OutputWindow.cpython-35.opt-1.pyc
4.417 KB
-rw-r--r--
OutputWindow.cpython-35.opt-2.pyc
4.238 KB
-rw-r--r--
OutputWindow.cpython-35.pyc
4.417 KB
-rw-r--r--
ParenMatch.cpython-35.opt-1.pyc
6.299 KB
-rw-r--r--
ParenMatch.cpython-35.opt-2.pyc
4.897 KB
-rw-r--r--
ParenMatch.cpython-35.pyc
6.299 KB
-rw-r--r--
PathBrowser.cpython-35.opt-1.pyc
4.01 KB
-rw-r--r--
PathBrowser.cpython-35.opt-2.pyc
3.864 KB
-rw-r--r--
PathBrowser.cpython-35.pyc
4.01 KB
-rw-r--r--
Percolator.cpython-35.opt-1.pyc
3.819 KB
-rw-r--r--
Percolator.cpython-35.opt-2.pyc
3.812 KB
-rw-r--r--
Percolator.cpython-35.pyc
3.988 KB
-rw-r--r--
PyParse.cpython-35.opt-1.pyc
10.71 KB
-rw-r--r--
PyParse.cpython-35.opt-2.pyc
9.849 KB
-rw-r--r--
PyParse.cpython-35.pyc
11.142 KB
-rw-r--r--
PyShell.cpython-35.opt-1.pyc
46.996 KB
-rw-r--r--
PyShell.cpython-35.opt-2.pyc
44.468 KB
-rw-r--r--
PyShell.cpython-35.pyc
47.132 KB
-rw-r--r--
RemoteDebugger.cpython-35.opt-1.pyc
14.17 KB
-rw-r--r--
RemoteDebugger.cpython-35.opt-2.pyc
11.825 KB
-rw-r--r--
RemoteDebugger.cpython-35.pyc
14.309 KB
-rw-r--r--
RemoteObjectBrowser.cpython-35.opt-1.pyc
1.962 KB
-rw-r--r--
RemoteObjectBrowser.cpython-35.opt-2.pyc
1.954 KB
-rw-r--r--
RemoteObjectBrowser.cpython-35.pyc
1.962 KB
-rw-r--r--
ReplaceDialog.cpython-35.opt-1.pyc
7.466 KB
-rw-r--r--
ReplaceDialog.cpython-35.opt-2.pyc
6.798 KB
-rw-r--r--
ReplaceDialog.cpython-35.pyc
7.466 KB
-rw-r--r--
RstripExtension.cpython-35.opt-1.pyc
1.321 KB
-rw-r--r--
RstripExtension.cpython-35.opt-2.pyc
1.235 KB
-rw-r--r--
RstripExtension.cpython-35.pyc
1.321 KB
-rw-r--r--
ScriptBinding.cpython-35.opt-1.pyc
6.9 KB
-rw-r--r--
ScriptBinding.cpython-35.opt-2.pyc
5.542 KB
-rw-r--r--
ScriptBinding.cpython-35.pyc
6.9 KB
-rw-r--r--
ScrolledList.cpython-35.opt-1.pyc
5.624 KB
-rw-r--r--
ScrolledList.cpython-35.opt-2.pyc
5.616 KB
-rw-r--r--
ScrolledList.cpython-35.pyc
5.624 KB
-rw-r--r--
SearchDialog.cpython-35.opt-1.pyc
3.693 KB
-rw-r--r--
SearchDialog.cpython-35.opt-2.pyc
3.439 KB
-rw-r--r--
SearchDialog.cpython-35.pyc
3.693 KB
-rw-r--r--
SearchDialogBase.cpython-35.opt-1.pyc
7.515 KB
-rw-r--r--
SearchDialogBase.cpython-35.opt-2.pyc
4.87 KB
-rw-r--r--
SearchDialogBase.cpython-35.pyc
7.515 KB
-rw-r--r--
SearchEngine.cpython-35.opt-1.pyc
7.239 KB
-rw-r--r--
SearchEngine.cpython-35.opt-2.pyc
5.616 KB
-rw-r--r--
SearchEngine.cpython-35.pyc
7.239 KB
-rw-r--r--
StackViewer.cpython-35.opt-1.pyc
5.461 KB
-rw-r--r--
StackViewer.cpython-35.opt-2.pyc
5.453 KB
-rw-r--r--
StackViewer.cpython-35.pyc
5.461 KB
-rw-r--r--
ToolTip.cpython-35.opt-1.pyc
3.948 KB
-rw-r--r--
ToolTip.cpython-35.opt-2.pyc
3.94 KB
-rw-r--r--
ToolTip.cpython-35.pyc
3.948 KB
-rw-r--r--
TreeWidget.cpython-35.opt-1.pyc
15.252 KB
-rw-r--r--
TreeWidget.cpython-35.opt-2.pyc
14.485 KB
-rw-r--r--
TreeWidget.cpython-35.pyc
15.252 KB
-rw-r--r--
UndoDelegator.cpython-35.opt-1.pyc
11.612 KB
-rw-r--r--
UndoDelegator.cpython-35.opt-2.pyc
11.604 KB
-rw-r--r--
UndoDelegator.cpython-35.pyc
11.612 KB
-rw-r--r--
WidgetRedirector.cpython-35.opt-1.pyc
6.953 KB
-rw-r--r--
WidgetRedirector.cpython-35.opt-2.pyc
3.585 KB
-rw-r--r--
WidgetRedirector.cpython-35.pyc
6.953 KB
-rw-r--r--
WindowList.cpython-35.opt-1.pyc
3.155 KB
-rw-r--r--
WindowList.cpython-35.opt-2.pyc
3.147 KB
-rw-r--r--
WindowList.cpython-35.pyc
3.155 KB
-rw-r--r--
ZoomHeight.cpython-35.opt-1.pyc
1.369 KB
-rw-r--r--
ZoomHeight.cpython-35.opt-2.pyc
1.361 KB
-rw-r--r--
ZoomHeight.cpython-35.pyc
1.369 KB
-rw-r--r--
__init__.cpython-35.opt-1.pyc
0.441 KB
-rw-r--r--
__init__.cpython-35.opt-2.pyc
0.138 KB
-rw-r--r--
__init__.cpython-35.pyc
0.441 KB
-rw-r--r--
__main__.cpython-35.opt-1.pyc
0.272 KB
-rw-r--r--
__main__.cpython-35.opt-2.pyc
0.193 KB
-rw-r--r--
__main__.cpython-35.pyc
0.272 KB
-rw-r--r--
aboutDialog.cpython-35.opt-1.pyc
5.935 KB
-rw-r--r--
aboutDialog.cpython-35.opt-2.pyc
5.768 KB
-rw-r--r--
aboutDialog.cpython-35.pyc
5.935 KB
-rw-r--r--
configDialog.cpython-35.opt-1.pyc
48.173 KB
-rw-r--r--
configDialog.cpython-35.opt-2.pyc
45.484 KB
-rw-r--r--
configDialog.cpython-35.pyc
48.173 KB
-rw-r--r--
configHandler.cpython-35.opt-1.pyc
26.252 KB
-rw-r--r--
configHandler.cpython-35.opt-2.pyc
18.241 KB
-rw-r--r--
configHandler.cpython-35.pyc
26.252 KB
-rw-r--r--
configHelpSourceEdit.cpython-35.opt-1.pyc
5.767 KB
-rw-r--r--
configHelpSourceEdit.cpython-35.opt-2.pyc
5.271 KB
-rw-r--r--
configHelpSourceEdit.cpython-35.pyc
5.767 KB
-rw-r--r--
configSectionNameDialog.cpython-35.opt-1.pyc
3.84 KB
-rw-r--r--
configSectionNameDialog.cpython-35.opt-2.pyc
3.217 KB
-rw-r--r--
configSectionNameDialog.cpython-35.pyc
3.84 KB
-rw-r--r--
dynOptionMenuWidget.cpython-35.opt-1.pyc
2.371 KB
-rw-r--r--
dynOptionMenuWidget.cpython-35.opt-2.pyc
1.988 KB
-rw-r--r--
dynOptionMenuWidget.cpython-35.pyc
2.371 KB
-rw-r--r--
help.cpython-35.opt-1.pyc
10.723 KB
-rw-r--r--
help.cpython-35.opt-2.pyc
8.036 KB
-rw-r--r--
help.cpython-35.pyc
10.723 KB
-rw-r--r--
idle.cpython-35.opt-1.pyc
0.363 KB
-rw-r--r--
idle.cpython-35.opt-2.pyc
0.355 KB
-rw-r--r--
idle.cpython-35.pyc
0.363 KB
-rw-r--r--
idlever.cpython-35.opt-1.pyc
0.538 KB
-rw-r--r--
idlever.cpython-35.opt-2.pyc
0.313 KB
-rw-r--r--
idlever.cpython-35.pyc
0.538 KB
-rw-r--r--
keybindingDialog.cpython-35.opt-1.pyc
10.706 KB
-rw-r--r--
keybindingDialog.cpython-35.opt-2.pyc
9.769 KB
-rw-r--r--
keybindingDialog.cpython-35.pyc
10.706 KB
-rw-r--r--
macosxSupport.cpython-35.opt-1.pyc
7.002 KB
-rw-r--r--
macosxSupport.cpython-35.opt-2.pyc
5.132 KB
-rw-r--r--
macosxSupport.cpython-35.pyc
7.114 KB
-rw-r--r--
rpc.cpython-35.opt-1.pyc
20.345 KB
-rw-r--r--
rpc.cpython-35.opt-2.pyc
17.025 KB
-rw-r--r--
rpc.cpython-35.pyc
20.445 KB
-rw-r--r--
run.cpython-35.opt-1.pyc
12.443 KB
-rw-r--r--
run.cpython-35.opt-2.pyc
10.561 KB
-rw-r--r--
run.cpython-35.pyc
12.492 KB
-rw-r--r--
tabbedpages.cpython-35.opt-1.pyc
16.676 KB
-rw-r--r--
tabbedpages.cpython-35.opt-2.pyc
11.787 KB
-rw-r--r--
tabbedpages.cpython-35.pyc
16.676 KB
-rw-r--r--
textView.cpython-35.opt-1.pyc
3.382 KB
-rw-r--r--
textView.cpython-35.opt-2.pyc
2.945 KB
-rw-r--r--
textView.cpython-35.pyc
3.382 KB
-rw-r--r--