Fix the class browser to work even when the file is not on sys.path.
This commit is contained in:
parent
060f24ce97
commit
654387efbd
@ -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
|
||||
|
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user