Make dofile read bytes instead of string, to allow compiled scripts

This commit is contained in:
Fierelier 2023-04-03 19:03:14 +02:00
parent 8b45621a19
commit f97cd553a7
1 changed files with 2 additions and 2 deletions

View File

@ -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"))