Clean up folder structure

This commit is contained in:
Fierelier 2022-12-19 12:26:47 +01:00
parent ef4df61d44
commit bb0a439b3c
3 changed files with 5 additions and 5 deletions

View File

@ -11,7 +11,7 @@ def main():
testpy.echo()
testpy = mfp.require("test")
testpy.echo()
testpy = mfp.dofile(mfp.p(mfp.sd,"modmfp","test.py")) # Same file as used for mfp.require
testpy = mfp.dofile(mfp.p(mfp.sd,"module","mfp","test.py")) # Same file as used for mfp.require
testpy.echo()
def bootstrap(name,modName):
@ -22,8 +22,8 @@ def bootstrap(name,modName):
else:
s = os.path.realpath(__file__)
if not os.path.join(os.path.dirname(s),"modpy") in sys.path:
sys.path = [os.path.join(os.path.dirname(s),"modpy")] + sys.path
if not os.path.join(os.path.dirname(s),"module","py") in sys.path:
sys.path = [os.path.join(os.path.dirname(s),"module","py")] + sys.path
mod = importlib.import_module(modName); modl = mod.Bunch()
mod.init(mod,modl,s,name)

View File

@ -77,5 +77,5 @@ def init(mod,modl,sp,d):
programName = distro + "." + s.replace(modl.sd + os.path.sep,"",1).rsplit(".",1)[0]
programNameSet = False
paths.append(p(modl.sd,"mod" +distro, "?.py"))
paths.append(p(modl.sd,"mod" +distro, "?","main.py"))
paths.append(p(modl.sd,"module",distro,"?.py"))
paths.append(p(modl.sd,"module",distro,"?","main.py"))