Unify module names (path separator is .)

This commit is contained in:
Fierelier 2023-04-03 20:00:11 +02:00
parent 55dee42376
commit 04561ecc41
1 changed files with 2 additions and 1 deletions

View File

@ -37,8 +37,9 @@ def dofile(path):
return docode(open(path,"rb").read(),path)
def dorequire(name,*args,**kwargs):
name = name.replace("/",".").replace("\\",".")
for path in paths:
path = path.replace("?",name)
path = path.replace("?",name.replace(".",os.path.sep))
if os.path.isfile(path):
return dofile(path,*args,**kwargs)
raise Exception("Library " +name+ " not found.")