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

@ -73,9 +73,9 @@ def find_file(section, name):
# Warning header displayed at the top of an output file.
def print_warning_header():
print "; This file is automatically generated."
print "; Do not edit it directly!"
print
print("; This file is automatically generated.")
print("; Do not edit it directly!")
print("")
# Remove comments beginning with "#" or ";"
@ -171,7 +171,7 @@ def parse_stream(stream):
if match:
line = parse_assignment(section, line, match)
print line
print(line)
# Parse command line options: