Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
7895562f
Commit
7895562f
authored
Oct 13, 1998
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add class browser functionality.
parent
ae08d389
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
Tools/idle/FileList.py
Tools/idle/FileList.py
+17
-0
No files found.
Tools/idle/FileList.py
View file @
7895562f
...
...
@@ -33,6 +33,7 @@ class MultiEditorWindow(EditorWindow):
self
.
io
.
edit
=
self
self
.
text
.
bind
(
"<<open-new-window>>"
,
self
.
flist
.
new_callback
)
self
.
text
.
bind
(
"<<close-all-windows>>"
,
self
.
flist
.
close_all_callback
)
self
.
text
.
bind
(
"<<open-class-browser>>"
,
self
.
open_class_browser
)
def
close_hook
(
self
):
self
.
flist
.
close_edit
(
self
)
...
...
@@ -60,6 +61,22 @@ class MultiEditorWindow(EditorWindow):
def
openit
(
self
=
self
,
file
=
file
):
self
.
flist
.
open
(
file
)
wmenu
.
add_command
(
label
=
file
,
command
=
openit
)
def
open_class_browser
(
self
,
event
=
None
):
filename
=
self
.
io
.
filename
if
not
filename
:
tkMessageBox
.
showerror
(
"No filename"
,
"This buffer has no associated filename"
,
master
=
self
.
text
)
return
None
head
,
tail
=
os
.
path
.
split
(
filename
)
base
,
ext
=
os
.
path
.
splitext
(
tail
)
import
pyclbr
if
pyclbr
.
_modules
.
has_key
(
base
):
del
pyclbr
.
_modules
[
base
]
import
ClassBrowser
ClassBrowser
.
ClassBrowser
(
self
.
flist
,
base
)
class
FileList
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment