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:
Simon Howard 2010-11-09 23:11:11 +00:00
parent 8bad55ffef
commit d6907ea974
5 changed files with 39 additions and 36 deletions

View file

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