Unify module names (path separator is .)
This commit is contained in:
parent
55dee42376
commit
04561ecc41
|
@ -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.")
|
||||
|
|
Loading…
Reference in New Issue