From e63ddfb8383a1fd753a1cb1287a9a24eb64e2bc8 Mon Sep 17 00:00:00 2001 From: _ <_> Date: Thu, 17 May 2018 15:28:28 -0700 Subject: [PATCH] Added library to path to search for .so --- bindings/__init__.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/bindings/__init__.py b/bindings/__init__.py index 6a1ff15..9675198 100644 --- a/bindings/__init__.py +++ b/bindings/__init__.py @@ -1,8 +1,13 @@ -import ctypes +import ctypes, os, sys def loadlibc(): sharedlib = './lib3ddevil1.so' libc = None + os.environ['PATH'] = os.path.abspath( + os.path.join( + os.path.dirname(__file__), "../")) \ + + ';' \ + + os.environ['PATH'] try: libc = ctypes.cdll.LoadLibrary(sharedlib) except OSError as e: @@ -10,4 +15,4 @@ def loadlibc(): raise SystemExit("Couldn't load %s" % sharedlib) return libc -libc = loadlibc() \ No newline at end of file +libc = loadlibc()