Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2aaeb52

Browse files
author
Just van Rossum
committed
fixed problem with "reloading" sub-sub-modules -- jvr
1 parent 14162ab commit 2aaeb52

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

Mac/Tools/IDE/PyEdit.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -520,13 +520,14 @@ def getenvironment(self):
520520
modname = ""
521521
while os.path.exists(os.path.join(dir, "__init__.py")):
522522
dir, dirname = os.path.split(dir)
523-
modname = modname + dirname + '.'
523+
modname = dirname + '.' + modname
524524
subname = _filename_as_modname(self.title)
525525
if modname:
526526
if subname == "__init__":
527-
modname = modname[:-1] # strip trailing period
527+
# strip trailing period
528+
modname = modname[:-1]
528529
else:
529-
modname = modname + subname
530+
modname = modname + subname
530531
else:
531532
modname = subname
532533
if sys.modules.has_key(modname):

0 commit comments

Comments
 (0)