summaryrefslogtreecommitdiff
path: root/toolbox/generate-input.h-labels.py
diff options
context:
space:
mode:
authorBernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>2016-02-23 20:54:35 +0100
committerBernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>2016-02-23 21:39:35 +0000
commitc434cf82d526f07cd3dcebf53582eeddf12b0a74 (patch)
treec05c7d467092ca7a6a1c8c687e5405ffa5351315 /toolbox/generate-input.h-labels.py
parent72d6269b6efda3e43a119de048b87758ff970184 (diff)
Allow building with Python 3.x
Allow the scripts to run with both python 2.x and 3.x Change-Id: I911118bcf370d09bdb2fb46afa21af64257f1ffb Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
Diffstat (limited to 'toolbox/generate-input.h-labels.py')
-rwxr-xr-xtoolbox/generate-input.h-labels.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/toolbox/generate-input.h-labels.py b/toolbox/generate-input.h-labels.py
index 30485a0e6..a2b911165 100755
--- a/toolbox/generate-input.h-labels.py
+++ b/toolbox/generate-input.h-labels.py
@@ -16,6 +16,7 @@
#
# pylint: disable=bad-indentation,bad-continuation
+from __future__ import print_function
import os
import re
import sys
@@ -72,11 +73,11 @@ with open(sys.argv[1], 'r') as f:
ff_list.append(name)
def Dump(struct_name, values):
- print 'static struct label %s[] = {' % (struct_name)
+ print('static struct label %s[] = {' % (struct_name))
for value in values:
- print ' LABEL(%s),' % (value)
- print ' LABEL_END,'
- print '};'
+ print(' LABEL(%s),' % (value))
+ print(' LABEL_END,')
+ print('};')
Dump("input_prop_labels", input_prop_list)
Dump("ev_labels", ev_list)