]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix the class browser to work even when the file is not on sys.path.
authorGuido van Rossum <guido@python.org>
Fri, 18 Dec 1998 15:52:54 +0000 (15:52 +0000)
committerGuido van Rossum <guido@python.org>
Fri, 18 Dec 1998 15:52:54 +0000 (15:52 +0000)
Tools/idle/ClassBrowser.py
Tools/idle/FileList.py

index ffbf5089e4fbcf15def40411e87be92b2c29ee5f..21ff22e77ef05ac636a92df8bf21f733161f0613 100644 (file)
@@ -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
index bebf74271ebf111bb2cdec110ac4711340726543..d9378e3cd2ff452f6cb8c4977f5b9d70a84eb569 100644 (file)
@@ -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: