From 0f7b18fa0d353aab0a44082b1aca8d8c00df71a7 Mon Sep 17 00:00:00 2001 From: Mathieu Bridon Date: Thu, 5 Jul 2018 15:17:32 +0200 Subject: python: Use the print function In Python 2, `print` was a statement, but it became a function in Python 3. Using print functions everywhere makes the script compatible with Python versions >= 2.6, including Python 3. Signed-off-by: Mathieu Bridon Acked-by: Eric Engestrom Acked-by: Dylan Baker --- src/compiler/nir/nir_opcodes_c.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/compiler/nir/nir_opcodes_c.py') diff --git a/src/compiler/nir/nir_opcodes_c.py b/src/compiler/nir/nir_opcodes_c.py index 8afccca9504..108e144b5f4 100644 --- a/src/compiler/nir/nir_opcodes_c.py +++ b/src/compiler/nir/nir_opcodes_c.py @@ -23,6 +23,8 @@ # Authors: # Connor Abbott (cwabbott0@gmail.com) +from __future__ import print_function + from nir_opcodes import opcodes from mako.template import Template @@ -135,4 +137,4 @@ const nir_op_info nir_op_infos[nir_num_opcodes] = { }; """) -print template.render(opcodes=opcodes) +print(template.render(opcodes=opcodes)) -- cgit v1.2.3