tzh
2024-08-22 c7d0944258c7d0943aa7b2211498fd612971ce27
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
Z\¬Qc@sîdZddlZddlZddlZddlmZddlmZddlm    Z    m
Z
m Z ddl m Z ddd„ƒYZd    e
fd
„ƒYZd e
fd „ƒYZd e
fd„ƒYZd„ZedkrêeƒndS(s„Class 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)
- show function argument list? (have to do pattern matching on source)
- should the classes and methods lists also be in the module's menu bar?
- add base classes to class browser tree
iÿÿÿÿN(tPyShell(tListedToplevel(tTreeNodetTreeItemtScrolledCanvas(tidleConft ClassBrowsercBs8eZd„Zdd„Zd„Zd„Zd„ZRS(cCs=||_tjj|d|jdƒ|_|j|ƒdS(Nis.py(tnametostpathtjointfiletinit(tselftflistRR    ((s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/ClassBrowser.pyt__init__s    #cCs|jjƒ|jjƒdS(N(ttoptdestroytnode(R tevent((s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/ClassBrowser.pytcloses cCs||_tjjƒt|jƒ|_}|jd|jƒ|j    d|jƒ|j
ƒ|j ƒt j dddƒ}t j|dƒd}t|d|d    d
d d ƒ}|jjd d ddƒ|jƒ}t|jd|ƒ|_}|jƒ|jƒdS(NtWM_DELETE_WINDOWs<Escape>tmaintThemeRtnormalt
backgroundtbgthighlightthicknessit    takefocusitexpandtfilltboth(Rtpyclbrt_modulestclearRtrootRtprotocolRtbindtsettitlet    focus_setRt    GetOptiont GetHighlightRtframetpacktrootnodeRtcanvastNoneRtupdateR(R RRtthemeRtsctitemR((s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/ClassBrowser.pyR #s     
 
 
cCs+|jjd|jƒ|jjdƒdS(NsClass Browser - s Class Browser(Rtwm_titleRt wm_iconname(R ((s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/ClassBrowser.pyR&7scCs t|jƒS(N(tModuleBrowserTreeItemR (R ((s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/ClassBrowser.pyR,;sN(t__name__t
__module__RR.RR R&R,(((s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/ClassBrowser.pyRs
             R5cBsGeZd„Zd„Zd„Zd„Zd„Zd„Zd„ZRS(cCs ||_dS(N(R (R R ((s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/ClassBrowser.pyR@scCstjj|jƒS(N(RR    tbasenameR (R ((s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/ClassBrowser.pytGetTextCscCsdS(Ntpython((R ((s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/ClassBrowser.pyt GetIconNameFscCsFg}x9|jƒD]+}t||j|jƒ}|j|ƒqW|S(N(t listclassestClassBrowserTreeItemtclassesR tappend(R tsublistRR2((s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/ClassBrowser.pyt
GetSubListIs
cCsStjj|jdƒdkr#dStjj|jƒs<dStjj|jƒdS(Niýÿÿÿs.py(RR    tnormcaseR texistsRRtopen(R ((s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/ClassBrowser.pyt OnDoubleClickPs
cCstjj|jdƒdkS(Niýÿÿÿs.py(RR    RBR (R ((s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/ClassBrowser.pyt IsExpandableWscCsÐtjj|jƒ\}}tjj|ƒ\}}tjj|ƒdkrOgSy tj||gtjƒ}Wnt    k
r…}gSXg}i|_
x|j ƒD]ò\}}    |    j |kr¢|}
t |    dƒrn|    jrng} xp|    jD]e} t| ƒtdƒkr| } n1| j} | j |    j krCd| j | f} n| j| ƒqëW|
ddj| ƒ}
n|j|    j|
fƒ|    |j
|
<q¢q¢W|jƒg}x!|D]\}}
|j|
ƒq¯W|S(Ns.pytsuperts%s.%ss(%s)s, (RR    tsplitR tsplitextRBR t readmodule_extsyst ImportErrorR>titemstmodulethasattrRGttypeRR?R
tlinenotsort(R tdirR RtexttdicttmsgRNtkeytcltstsuperstsuptsnametlistR2((s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/ClassBrowser.pyR<Zs<             
(    R6R7RR9R;RARERFR<(((s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/ClassBrowser.pyR5>s                        R=cBsGeZd„Zd„Zd„Zd„Zd„Zd„Zd„ZRS(cCsq||_||_||_y|j|j|_Wn ttfk
rTd|_nXt|jtj    ƒ|_
dS(N( RR>R RYt
IndexErrortKeyErrorR.t
isinstanceR tFunctiont
isfunction(R RR>R ((s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/ClassBrowser.pyR}s             cCs'|jrd|jdSd|jSdS(Nsdef s(...)sclass (RcR(R ((s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/ClassBrowser.pyR9‡s    cCs|jr dSdSdS(NR:tfolder(Rc(R ((s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/ClassBrowser.pyR;s    cCs5|jr1y|jj SWq1tk
r-tSXndS(N(RYtmethodstAttributeErrortFalse(R ((s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/ClassBrowser.pyRF“s
     cCsS|js gSg}x9|jƒD]+}t||j|jƒ}|j|ƒq W|S(N(RYt listmethodstMethodBrowserTreeItemR R?(R R@RR2((s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/ClassBrowser.pyRAšs    cCs`tjj|jƒsdStjj|jƒ}t|jdƒr\|jj    }|j
|ƒndS(NRR( RR    RCR RRRDRPRYRRtgotoline(R teditRR((s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/ClassBrowser.pyRE£s  cCs|js gSg}x3|jjjƒD]\}}|j||fƒq&W|jƒg}x!|D]\}}|j|ƒq`W|S(N(RYReRNR?RS(R RNRRRR^R2((s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/ClassBrowser.pyRh«s    
(    R6R7RR9R;RFRARERh(((s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/ClassBrowser.pyR={s    
                       RicBs5eZd„Zd„Zd„Zd„Zd„ZRS(cCs||_||_||_dS(N(RRYR (R RRYR ((s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/ClassBrowser.pyR¹s        cCsd|jdS(Nsdef s(...)(R(R ((s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/ClassBrowser.pyR9¾scCsdS(NR:((R ((s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/ClassBrowser.pyR;ÁscCsdS(Ni((R ((s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/ClassBrowser.pyRFÄscCsLtjj|jƒsdStjj|jƒ}|j|jj    |j
ƒdS(N( RR    RCR RRRDRjRYReR(R Rk((s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/ClassBrowser.pyREÇs(R6R7RR9R;RFRE(((s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/ClassBrowser.pyRi·s
                cCs¹y
t}WnHtk
rTtjd}tjdrDtjd}qUtjd}nXtjj|ƒ\}}tjj|ƒd}tt    j
||gƒtj tj krµt ƒndS(Nii(t__file__t    NameErrorRLtargvRR    RIRJRRRtstdint    __stdin__tmainloop(R RTR((s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/ClassBrowser.pyRÍs
   t__main__((t__doc__RRLR tidlelibRtidlelib.WindowListRtidlelib.TreeWidgetRRRtidlelib.configHandlerRRR5R=RiRR6(((s\/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/ClassBrowser.pyt<module> s   (=<