mirror of
https://github.com/freedoom/freedoom.git
synced 2025-09-04 22:25:47 -04:00
build: Update Python scripts to work with Python 3.
Python 3 makes a number of changes to the language and breaks backward compatibility with Python 2 in some places. This change updates the Python scripts used in the build system to work with Python 3, although the updated scripts still run in Python 2 as well. Most of the changes are minor; the biggest changes are to the palette / colormap generation scripts. Signed-off-by: Simon Howard <fraggle@gmail.com>
This commit is contained in:
parent
8bad55ffef
commit
d6907ea974
5 changed files with 39 additions and 36 deletions
|
@ -84,7 +84,7 @@ def parse_stream(stream):
|
|||
raise Exception("Mismatched #if in '%s'" % stream.name)
|
||||
|
||||
def parse_file(filename):
|
||||
f = file(filename)
|
||||
f = open(filename)
|
||||
|
||||
try:
|
||||
parse_stream(f)
|
||||
|
@ -209,7 +209,7 @@ def read_block(stream, ignore):
|
|||
func(arg)
|
||||
else:
|
||||
if not ignore:
|
||||
print line
|
||||
print(line)
|
||||
|
||||
parse_cmdline()
|
||||
parse_stream(sys.stdin)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue