From 5eb75c311e624ebc101326027b541bfc1a917edb Mon Sep 17 00:00:00 2001 From: Willi Ballenthin Date: Mon, 2 Nov 2015 09:34:58 -0500 Subject: [PATCH] python bindings: use relative paths for imports to support py3 --- bindings/python/unicorn/__init__.py | 4 ++-- bindings/python/unicorn/unicorn.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bindings/python/unicorn/__init__.py b/bindings/python/unicorn/__init__.py index 8c137768..3f63904c 100644 --- a/bindings/python/unicorn/__init__.py +++ b/bindings/python/unicorn/__init__.py @@ -1,4 +1,4 @@ # Unicorn Python bindings, by Nguyen Anh Quynnh from . import arm_const, arm64_const, mips_const, sparc_const, m68k_const, x86_const -from unicorn_const import * -from unicorn import Uc, uc_version, uc_arch_supported, version_bind, debug, UcError +from .unicorn_const import * +from .unicorn import Uc, uc_version, uc_arch_supported, version_bind, debug, UcError diff --git a/bindings/python/unicorn/unicorn.py b/bindings/python/unicorn/unicorn.py index 8255b9dc..553d2176 100644 --- a/bindings/python/unicorn/unicorn.py +++ b/bindings/python/unicorn/unicorn.py @@ -4,7 +4,7 @@ _python2 = sys.version_info[0] < 3 if _python2: range = xrange from . import arm_const, arm64_const, mips_const, sparc_const, m68k_const, x86_const -from unicorn_const import * +from .unicorn_const import * import ctypes, ctypes.util, sys from platform import system