From ac869205cb124961884700a8e1e2068d51216e2b Mon Sep 17 00:00:00 2001 From: Rezec Date: Fri, 27 Jan 2023 20:08:29 -0500 Subject: [PATCH] updated to python3 --- utils/build_object_template_crc_string_tables.py | 4 ++-- utils/build_planet_crc_string_tables.py | 2 +- utils/build_quest_crc_string_tables.py | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/utils/build_object_template_crc_string_tables.py b/utils/build_object_template_crc_string_tables.py index 9b99ac3..125a71e 100755 --- a/utils/build_object_template_crc_string_tables.py +++ b/utils/build_object_template_crc_string_tables.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/python3 from os import walk, path, makedirs from subprocess import PIPE, Popen @@ -34,7 +34,7 @@ def build_table(type, objs): p = Popen(crc_call, stdin=PIPE, stdout=PIPE) for obj in sorted(objs): - p.stdin.write(obj + '\n') + p.stdin.write('{}\n'.format(obj).encode('utf-8')) p.communicate() diff --git a/utils/build_planet_crc_string_tables.py b/utils/build_planet_crc_string_tables.py index 50c8f8e..3e0efa0 100755 --- a/utils/build_planet_crc_string_tables.py +++ b/utils/build_planet_crc_string_tables.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/python3 from os import path, makedirs from subprocess import PIPE, Popen diff --git a/utils/build_quest_crc_string_tables.py b/utils/build_quest_crc_string_tables.py index 2ebf484..2f9f217 100755 --- a/utils/build_quest_crc_string_tables.py +++ b/utils/build_quest_crc_string_tables.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/python3 from os import walk, path, makedirs from subprocess import PIPE, Popen @@ -39,6 +39,6 @@ crc_call = ['./tools/buildCrcStringTable.pl', '-t', tabfile, ifffile] p = Popen(crc_call, stdin=PIPE, stdout=PIPE) for obj in allobjs: - p.stdin.write(obj + '\n') + p.stdin.write('{}\n'.format(obj).encode('utf-8')) p.communicate()