Fix the class browser to work even when the file is not on sys.path.

This commit is contained in:
Guido van Rossum 1998-12-18 15:52:54 +00:00
parent 060f24ce97
commit 654387efbd
2 changed files with 3 additions and 3 deletions

View 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

View 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: