Warning: file_get_contents(https://raw.githubusercontent.com/Den1xxx/Filemanager/master/languages/ru.json): Failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
in /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php on line 107
Warning: Cannot modify header information - headers already sent by (output started at /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php:1) in /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php on line 234
Warning: Cannot modify header information - headers already sent by (output started at /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php:1) in /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php on line 235
Warning: Cannot modify header information - headers already sent by (output started at /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php:1) in /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php on line 236
Warning: Cannot modify header information - headers already sent by (output started at /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php:1) in /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php on line 237
Warning: Cannot modify header information - headers already sent by (output started at /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php:1) in /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php on line 238
Warning: Cannot modify header information - headers already sent by (output started at /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php:1) in /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php on line 239
U
i_z @ s d Z ddlZddlZddlZddlmZ ddlmZ ddlm Z m
Z
mZ ddlm
Z
dadddZG d d
d
ZG dd de
ZG d
d de
Zdd ZedkreejdkrddlmZ edddd ddlmZ ee dS )a8 Module 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)TreeNodeTreeItemScrolledCanvas)ListedToplevelc C s g }| D ]\}}|dks&|j|krt|dr|jr|j|krg }|jD ]F}t|tdkrd|}n"|j}|j|jkr|j d| }|| qJ| jdd|7 _|| q|S )a Transform 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.
Nsuper .z({})z, ) itemsmodulehasattrr nametypeappendformatjoin)Z
child_dictmodnameZobskeyobjZsuperssupZsname r ./opt/python38/lib/python3.8/idlelib/browser.pytransform_children s
r c @ sB e Zd ZdZdddddZdddZd d
Zdd Zd
d ZdS )
ModuleBrowserz1Browse module classes and functions in IDLE.
F)_htest_utestc C s$ || _ || _|| _|| _| dS )az Create 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)masterpathr r init)selfr r r r r r r __init__A s
zModuleBrowser.__init__Nc C s | j | j dS )z&Dismiss the window and the tree nodes.N)topZdestroynode)r eventr r r closeY s
zModuleBrowser.closec C s | j }| js| jstjnt|}|jatj
t| | _}|
d| j |d| j | jr|d| | d f | | t }t|dd }t||ddd }|jjdd
d | }t|jd| | _}| js| | dS )
z3Create browser tkinter widgets, including the tree.ZWM_DELETE_WINDOWzz+%d+%d Znormal
backgroundr )bgZhighlightthicknessZ takefocusZboth)expandfillN)!r r r r flistZPyShellFileListopen file_openpyclbrZ_modulesclearr r" protocolr% bindZgeometryZwinfo_rootxZwinfo_rootysettitleZ focus_setr ZCurrentThemeZGetHighlightr framepackrootnoder Zcanvasr# updater* ) r rootr, r" Zthemer' Zscitemr# r r r r ^ s4
zModuleBrowser.initc C s* | j dtj| j | j d dS )zSet the window title.zModule Browser - zModule BrowserN)r" Zwm_titleosr basenameZwm_iconnamer r r r r3 } s zModuleBrowser.settitlec C s
t | jS )z7Return a ModuleBrowserTreeItem as the root of the tree.)ModuleBrowserTreeItemr r<