mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 05:16:21 +00:00
ReplaceValues.py: make the file compilable with Python 3
see the mailing list thread "compilation of LyX 2.3 fails with Python 3.6.2" for details
This commit is contained in:
parent
f1e1739d62
commit
f075f8ad0a
@ -13,6 +13,7 @@ from __future__ import print_function
|
||||
|
||||
import sys
|
||||
import re
|
||||
import codecs
|
||||
|
||||
Subst = {} # map of desired substitutions
|
||||
prog = re.compile("")
|
||||
@ -33,8 +34,8 @@ def SubstituteDataInLine(line):
|
||||
|
||||
|
||||
def SubstituteDataInFile(InFile):
|
||||
for line in open(InFile):
|
||||
print(SubstituteDataInLine(line[:-1]))
|
||||
for line in codecs.open(InFile, 'r', 'utf-8'):
|
||||
print(SubstituteDataInLine(line[:-1]).encode("utf-8"))
|
||||
|
||||
##########################################
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user