summaryrefslogtreecommitdiffstats
path: root/Tools
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1998-12-18 15:52:54 (GMT)
committerGuido van Rossum <guido@python.org>1998-12-18 15:52:54 (GMT)
commit654387efbd9ba363a1911e493a8477f15608e1a0 (patch)
tree32b92283ef94394fa163cd074df4fb67993886aa /Tools
parent060f24ce972f7f1ee3cf6f3444c09dd4869fa186 (diff)
downloadcpython-654387efbd9ba363a1911e493a8477f15608e1a0.zip
cpython-654387efbd9ba363a1911e493a8477f15608e1a0.tar.gz
cpython-654387efbd9ba363a1911e493a8477f15608e1a0.tar.bz2
Fix the class browser to work even when the file is not on sys.path.
Diffstat (limited to 'Tools')
-rw-r--r--Tools/idle/ClassBrowser.py4
-rw-r--r--Tools/idle/FileList.py2
2 files changed, 3 insertions, 3 deletions
diff --git a/Tools/idle/ClassBrowser.py b/Tools/idle/ClassBrowser.py
index ffbf508..21ff22e 100644
--- a/Tools/idle/ClassBrowser.py
+++ b/Tools/idle/ClassBrowser.py
@@ -20,10 +20,10 @@ from ScrolledList import ScrolledList
class ClassBrowser:
- def __init__(self, flist, name):
+ def __init__(self, flist, name, path=[]):
root = flist.root
try:
- dict = pyclbr.readmodule(name)
+ dict = pyclbr.readmodule(name, path)
except ImportError, msg:
tkMessageBox.showerror("Import error", str(msg), parent=root)
return
diff --git a/Tools/idle/FileList.py b/Tools/idle/FileList.py
index bebf7427..d9378e3 100644
--- a/Tools/idle/FileList.py
+++ b/Tools/idle/FileList.py
@@ -76,7 +76,7 @@ class MultiEditorWindow(EditorWindow):
if pyclbr._modules.has_key(base):
del pyclbr._modules[base]
import ClassBrowser
- ClassBrowser.ClassBrowser(self.flist, base)
+ ClassBrowser.ClassBrowser(self.flist, base, [head])
class FileList: