/opt/imh/python3.13/lib/python3.13/idlelib/__pycache__
Edit: /opt/imh/python3.13/lib/python3.13/idlelib/__pycache__/browser.cpython-313.pyc (13504B)
e! 4 S r SSKrSSKrSSKrSSKJr SSKJr SSKJ r J
r
Jr SSKJ
r
SSKJr SqSrS rSS
jr " S S5 r " S
S\
5 r " S S\
5 rS r\S:X a3 \" \R4 5 S:X a SSKJr \" SSSS9 SSKJr \" \5 gg)zModule 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
N)idleConf)pyshell)TreeNodeTreeItemScrolledCanvas)
py_extensions)ListedToplevel)z.pyic [ R R U 5 u p[ R R U5 nU[ ; =( a U[
; $ N)ospathsplitextnormcaser browseable_extension_blocklist)r
_exts 5/opt/imh/python3.13/lib/python3.13/idlelib/browser.pyis_browseable_extensionr sB
WW
d
#FA
''
3
C-MC/M$MM c @ / nU R 5 GH u p4Ub UR U:X d M [ US5 ( a UR ( a UR U:X a / nUR Hc n[ U[ 5 ( a UnO7UR nUR UR :w a UR SU 3nUR U5 Me U=R SR SR U5 5 -
sl UR U5 GM U$ )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.
super.z({})z, )
itemsmodulehasattrr name
isinstancestrappendformatjoin)
child_dictmodnameobskeyobjsuperssupsnames r transform_childrenr* # s
C$$&?cjjG3sG$$sxx399C!#s++ # #::3'*zzl!E7$;EMM%( % FMM$))F*;<<JJsO ' Jr c D \ rS rSrSrSSS.S jrSS jrS rS rS
r Sr
g)
ModuleBrowserC z1Browse module classes and functions in IDLE.
F)_htest_utestc T Xl X l X0l X@l U R 5 g)a 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 supported extension.
Used in creating ModuleBrowserTreeItem as the rootnode for
the tree and subsequently in the children.
N)masterr
r. r/ init)selfr1 r
r. r/ s r __init__ModuleBrowser.__init__J s! $ r Nc l U R R 5 U R R 5 g)z&Dismiss the window and the tree nodes.N)topdestroynode)r3 events r closeModuleBrowser.closeb s" r c U R nU R ( d! U R ( d [ R O[ R
" U5 nUR q[ R R 5 [ U5 =U l nUR SU R 5 UR SU R 5 U R ( a5 UR! SUR# 5 UR% 5 S- 4- 5 U R' 5 UR) 5 [* R, " 5 n[* R. " US5 S n[1 X5SSS 9nUR2 R5 SS
S9 U R7 5 n[9 UR: SU5 =U l nU R ( d! UR? 5 URA 5 gg)
z3Create browser tkinter widgets, including the tree.WM_DELETE_WINDOWz
z+%d+%d normal
backgroundr )bghighlightthickness takefocusboth)expandfillN)!r1 r. r/ r flistPyShellFileListopen file_openpyclbr_modulesclearr r7 protocolr; bindgeometrywinfo_rootxwinfo_rootysettitle focus_setr CurrentThemeGetHighlightr framepackrootnoder canvasr9 updaterG ) r3 rootrI r7 themerA scitemr9 s r r2 ModuleBrowser.initg s^ {{'+{{dkk--d3 JJ (--3'4TZZ(;;LL!!#T%5%5%7#%=>?
@
%%'**5(;LI
C1&')
QV
,}}#BIItT:: D{{KKMKKM r c U R R S[ R R U R 5 - 5 U R R S5 g)zSet the window title.zModule Browser - zModule BrowserN)r7 wm_titler r
basenamewm_iconnamer3 s r rU ModuleBrowser.settitle s@ -0@0@0KKL-.r c , [ U R 5 $ )z7Return a ModuleBrowserTreeItem as the root of the tree.)ModuleBrowserTreeItemr
rg s r r[ ModuleBrowser.rootnode s $TYY//r )r. r/ r1 r9 r
r7 r )__name__
__module____qualname____firstlineno____doc__r4 r; r2 rU r[ __static_attributes__ r r r, r, C s' 05U 0
>/
0r r, c B \ rS rSrSrS rS rS rS rS r S r
S rS
rg)rj zrBrowser tree for Python module.
Uses TreeItem as the basis for the structure of the tree.
Used by both browsers.
c Xl g)zLCreate a TreeItem for the file.
Args:
file: Full path and module name.
Nfile)r3 rw s r r4 ModuleBrowserTreeItem.__init__ s r c T [ R R U R 5 $ )z5Return the module name as the text string to display.)r r
re rw rg s r GetTextModuleBrowserTreeItem.GetText s ww **r c g)'Return the name of the icon to display.pythonrr rg s r GetIconName!ModuleBrowserTreeItem.GetIconName s r c ` U R 5 Vs/ s H n[ U5 PM sn$ s snf z*Return ChildBrowserTreeItems for children.)listchildrenChildBrowserTreeItemr3 r&