From fea142d60e0db01e4e83be63c2dbf1c71bf14968 Mon Sep 17 00:00:00 2001 From: ingvar1995 Date: Tue, 16 Feb 2016 23:30:43 +0300 Subject: [PATCH] tox.py update --- src/tox.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/tox.py b/src/tox.py index ad2c4f5..1418140 100644 --- a/src/tox.py +++ b/src/tox.py @@ -2,7 +2,7 @@ from ctypes import * from settings import Settings from platform import system - +import os class ToxOptions(Structure): _fields_ = [ @@ -31,9 +31,12 @@ class Tox(object): size = len(data) print size if system() == 'Linux': - self.libtoxcore = CDLL('libs/libtoxcore.so') + temp = os.path.dirname(os.path.abspath(__file__)) + '/libs/' + os.chdir(temp) + print temp + self.libtoxcore = CDLL(temp + 'libtoxcore.so') elif system() == 'Windows': - self.libtoxcore = CDLL('libs/libtox.dll') + self.libtoxcore = CDLL('/libs/libtox.dll') print self.libtoxcore.__dict__ self.libtoxcore.tox_options_new.restype = POINTER(ToxOptions) # TODO: load from settings