Kaydet (Commit) 2aaeb526 authored tarafından Just van Rossum's avatar Just van Rossum

fixed problem with "reloading" sub-sub-modules -- jvr

üst 14162abf
...@@ -520,13 +520,14 @@ class Editor(W.Window): ...@@ -520,13 +520,14 @@ class Editor(W.Window):
modname = "" modname = ""
while os.path.exists(os.path.join(dir, "__init__.py")): while os.path.exists(os.path.join(dir, "__init__.py")):
dir, dirname = os.path.split(dir) dir, dirname = os.path.split(dir)
modname = modname + dirname + '.' modname = dirname + '.' + modname
subname = _filename_as_modname(self.title) subname = _filename_as_modname(self.title)
if modname: if modname:
if subname == "__init__": if subname == "__init__":
modname = modname[:-1] # strip trailing period # strip trailing period
modname = modname[:-1]
else: else:
modname = modname + subname modname = modname + subname
else: else:
modname = subname modname = subname
if sys.modules.has_key(modname): if sys.modules.has_key(modname):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment