From 02bbb30efea4980c9d133947cbbf69fb599071ad Mon Sep 17 00:00:00 2001 From: Fabrice Desclaux Date: Mon, 25 Feb 2019 11:09:54 +0100 Subject: Support python2/python3 --- example/ida/utils.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'example/ida/utils.py') diff --git a/example/ida/utils.py b/example/ida/utils.py index a64973f1..b6d5dac4 100644 --- a/example/ida/utils.py +++ b/example/ida/utils.py @@ -1,3 +1,5 @@ +from __future__ import print_function +from builtins import map import idaapi from idc import * @@ -67,7 +69,7 @@ def guess_machine(addr=None): elif processor_name == "PPC": machine = Machine("ppc32b") else: - print repr(processor_name) + print(repr(processor_name)) raise NotImplementedError('not fully functional') return machine @@ -204,7 +206,7 @@ Python Expression dest_lang = self.languages[self.GetControlValue(self.cbLanguage)] try: text = Translator.to_language(dest_lang).from_expr(self.expr) - except Exception, error: + except Exception as error: self.ShowField(self.result, False) return -1 -- cgit 1.4.1