]> granicus.if.org Git - python/commitdiff
fixed problem with "reloading" sub-sub-modules -- jvr
authorJust van Rossum <just@lettererror.com>
Fri, 5 Feb 1999 21:58:25 +0000 (21:58 +0000)
committerJust van Rossum <just@lettererror.com>
Fri, 5 Feb 1999 21:58:25 +0000 (21:58 +0000)
Mac/Tools/IDE/PyEdit.py

index 80397a18eebfc469b4930fd5650803af93d634b2..01e7ed6add463b8f3030f9f28d760a6f573db2a4 100644 (file)
@@ -520,13 +520,14 @@ class Editor(W.Window):
                        modname = ""
                        while os.path.exists(os.path.join(dir, "__init__.py")):
                                dir, dirname = os.path.split(dir)
-                               modname = modname + dirname + '.'
+                               modname = dirname + '.' + modname
                        subname = _filename_as_modname(self.title)
                        if modname:
                                if subname == "__init__":
-                                       modname  = modname[:-1]  # strip trailing period
+                                       # strip trailing period
+                                       modname = modname[:-1]
                                else:
-                                       modname  = modname + subname
+                                       modname = modname + subname
                        else:
                                modname = subname
                        if sys.modules.has_key(modname):