Make dofile read bytes instead of string, to allow compiled scripts
This commit is contained in:
parent
8b45621a19
commit
f97cd553a7
|
@ -34,7 +34,7 @@ def docode(st,name = "Unknown"):
|
|||
return glb
|
||||
|
||||
def dofile(path):
|
||||
return docode(open(path,encoding="utf-8").read(),path)
|
||||
return docode(open(path,"rb").read(),path)
|
||||
|
||||
def dorequire(name,*args,**kwargs):
|
||||
for path in paths:
|
||||
|
@ -78,4 +78,4 @@ def init(mod,modl,sp,d):
|
|||
programNameSet = False
|
||||
|
||||
paths.append(p(modl.sd,"module","?.py"))
|
||||
paths.append(p(modl.sd,"module","?","_main.py"))
|
||||
paths.append(p(modl.sd,"module","?","_main.py"))
|
||||
|
|
Loading…
Reference in New Issue