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

� f�@s�dZddlmZmZddlmZmZmZmZm	Z	Gdd�d�Z
Gdd�de
�Zedkr�dd	l
mZed
ddd
�ddlmZee�dS)zBDefine SearchDialogBase used by Search, Replace, and Grep dialogs.�)�Toplevel�Frame)�Entry�Label�Button�Checkbutton�Radiobuttonc@s|eZdZdZdZdZdZdd�Zddd	�Zdd
d�Z	dd
�Z
dd�Zdd�Zddd�Z
dd�Zdd�Zd dd�Zdd�ZdS)!�SearchDialogBaseayCreate most of a 3 or 4 row, 3 column search dialog.

    The left and wide middle column contain:
    1 or 2 labeled text entry lines (make_entry, create_entries);
    a row of standard Checkbuttons (make_frame, create_option_buttons),
    each of which corresponds to a search engine Variable;
    a row of dialog-specific Check/Radiobuttons (create_other_buttons).

    The narrow right column contains command buttons
    (make_button, create_command_buttons).
    These are bound to functions that execute the command.

    Except for command buttons, this base class is not limited to items
    common to all three subclasses.  Rather, it is the Find dialog minus
    the "Find Next" command, its execution function, and the
    default_command attribute needed in create_widgets. The other
    dialogs override attributes and methods, the latter to replace and
    add widgets.
    z
Search DialogZSearch�cCs||_||_d|_dS)a'Initialize root, engine, and top attributes.

        top (level widget): set in create_widgets() called from open().
        text (Text searched): set in open(), only used in subclasses().
        ent (ry): created in make_entry() called from create_entry().
        row (of grid): 0 in create_widgets(), +1 in make_entry/frame().
        default_command: set in subclasses, used in create_widgers().

        title (of dialog): class attribute, override in subclasses.
        icon (of dialog): ditto, use unclear if cannot minimize dialog.
        N)�root�engine�top)�selfrr�r�7/opt/alt/python36/lib64/python3.6/idlelib/searchbase.py�__init__ szSearchDialogBase.__init__NcCs|||_|js|j�n|jj�|jj�|rJ|jjdd�|jjd|�|jj�|jj	dd�|jj
d�|jj�dS)z6Make dialog visible on top of others and ready to use.r�endN)�textr
�create_widgetsZ	deiconifyZtkraise�ent�delete�insertZ	focus_setZselection_rangeZicursorZgrab_set)rrZsearchphraserrr�open0s



zSearchDialogBase.opencCs|jr|jj�|jj�dS)zPut dialog away for later use.N)r
Zgrab_releaseZwithdraw)rZeventrrr�close@s
zSearchDialogBase.closecCs�t|j�}|jd|j�|jd|j�|jd|j�|j|j�|j|j	�||_
|j|_d|_|j
j
dddd�|j
j
ddddd	�|j�|j�|j�|j�d
S)z�Create basic 3 row x 3 col search (find) dialog.

        Other dialogs override subsidiary create_x methods as needed.
        Replace and Find-in-Files add another entry row.
        z<Return>z<Escape>ZWM_DELETE_WINDOWr�)�pad�weightr
�d)rZminsizerN)rrZbind�default_commandrZprotocolZwm_title�titleZwm_iconname�iconr
Zbell�rowZgrid_columnconfigure�create_entries�create_option_buttons�create_other_buttons�create_command_buttons)rr
rrrrFs
zSearchDialogBase.create_widgetscCsVt|j|d�}|j|jddd�t|j|dd�}|j|jddd�|jd|_||fS)z�Return (entry, label), .

        entry - gridded labeled Entry for text entry.
        label - Label widget, returned for testing.
        )rr�nw)r!�column�sticky)ZtextvariableZexportselectionr
�nwe)rr
�gridr!r)rZ
label_text�var�label�entryrrr�
make_entry^szSearchDialogBase.make_entrycCs|jd|jj�d|_dS)z/Create one or more entry lines with make_entry.zFind:rN)r.rZpatvarr)rrrrr"kszSearchDialogBase.create_entriescCs\|r&t|j|d�}|j|jddd�nd}t|j�}|j|jdddd�|jd|_||fS)	z�Return (frame, label).

        frame - gridded labeled Frame for option or other buttons.
        label - Label widget, returned for testing.
        )rrr&)r!r'r(�r
r))r!r'Z
columnspanr()rr
r*r!r)rZ	labeltextr,�framerrr�
make_frameos
zSearchDialogBase.make_framecCs||jd�d}|j}|jdf|jdf|jdfg}|jrF|j|jdf�x,|D]$\}}t|||d�}|j	dd	d
�qLW||fS)aReturn (filled frame, options) for testing.

        Options is a list of searchengine booleanvar, label pairs.
        A gridded frame from make_frame is filled with a Checkbutton
        for each pair, bound to the var, with the corresponding label.
        ZOptionsrzRegular expressionz
Match casez
Whole wordzWrap around)�variabler�left�both)�side�fill)
r1rZrevarZcasevarZwordvar�needwrapbutton�appendZwrapvarr�pack)rr0rZoptionsr+r,�btnrrrr#sz&SearchDialogBase.create_option_buttonscCsV|jd�d}|jj}d
dg}x.|D]&\}}t||||d�}|jddd	�q$W||fS)z�Return (frame, others) for testing.

        Others is a list of value, label pairs.
        A gridded frame from make_frame is filled with radio buttons.
        Z	Directionrr
�Up�Down)r2�valuerr3r4)r5r6)r
r;)rr<)r1rZbackvarrr9)rr0r+Zothers�valr,r:rrrr$�sz%SearchDialogBase.create_other_buttonsrcCsPt|j|||rdpdd�}|jj�\}}|jd|ddd�|jj|dd�|S)	z/Return command button gridded in command frame.ZactiveZnormal)r�command�defaultr
rZew)�padyr!r'r()Zrowspan)r�buttonframeZ	grid_sizer*)rr,r?Zisdef�bZcolsZrowsrrr�make_button�szSearchDialogBase.make_buttoncCs@t|j�}|_|jddddddd�|jd|j�}|j�dS)z9Place buttons in vertical command frame gridded on right.rr)r!r'ZpadxrAZipadxZipadyrN)rr
rBr*rDr�lower)r�frCrrrr%�sz'SearchDialogBase.create_command_buttons)N)N)N)r)�__name__�
__module__�__qualname__�__doc__rr r7rrrrr.r"r1r#r$rDr%rrrrr	s





r	c@s eZdZdZdd�Zdd�ZdS)�_searchbasez3Create auto-opening dialog with no text connection.cCs|ddl}ddlm}||_|j|�|_|j�t|j��t	t
t|jd|j����\}}}}|j
jd|d|df�dS)Nr)�searchenginez[x+]z+%d+%d�(�)�reZidlelibrLr�getrr�printZgeometry�list�map�int�splitr
)r�parentrOrL�widthZheight�x�yrrrr�s"z_searchbase.__init__cCsdS)Nr)rZdummyrrrr�sz_searchbase.default_commandN)rGrHrIrJrrrrrrrK�srK�__main__)�mainz!idlelib.idle_test.test_searchbaserF)�	verbosity�exit)�runN)rJZtkinterrrZtkinter.ttkrrrrrr	rKrGZunittestr[Zidlelib.idle_test.htestr^rrrr�<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--