X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=compile.py;h=ac952734e0c585e456ca5c4ad103f242ed95d99f;hb=d933c3f731ba0f854e07dda73f60c39c70b11526;hp=1ab332851c9c6571234e359f91e756df9d4b5dd0;hpb=cee442b16b80490c3549b667068372fd28395593;p=perso%2FImmae%2FProjets%2FCryptomonnaies%2FBIP39.git diff --git a/compile.py b/compile.py index 1ab3328..ac95273 100644 --- a/compile.py +++ b/compile.py @@ -6,7 +6,7 @@ import datetime # It removes script and style tags and replaces with the file content. -f = open('src/index.html') +f = open('src/index.html', "r", encoding="utf-8") page = f.read() f.close() @@ -18,7 +18,7 @@ scripts = scriptsFinder.findall(page) for script in scripts: filename = os.path.join("src", script) - s = open(filename) + s = open(filename, "r", encoding="utf-8") scriptContent = "" % s.read() s.close() scriptTag = """""" % script @@ -32,7 +32,7 @@ styles = stylesFinder.findall(page) for style in styles: filename = os.path.join("src", style) - s = open(filename) + s = open(filename, "r", encoding="utf-8") styleContent = "" % s.read() s.close() styleTag = """""" % style @@ -41,8 +41,8 @@ for style in styles: # Write the standalone file -f = open('bip39-standalone.html', 'w') +f = open('bip39-standalone.html', 'w', encoding="utf-8") f.write(page) f.close() -print "%s - DONE" % datetime.datetime.now() +print("%s - DONE" % datetime.datetime.now())