diff options
| author | morefigs <morefigs@gmail.com> | 2017-09-15 10:26:37 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-09-15 10:26:37 +1000 |
| commit | 7059da91f84547a18afab8d2d87349aa63cbd782 (patch) | |
| tree | 346fcc5a0545c5c3ee0c93288f1d0a7a8f359a47 | |
| parent | 2baf48689a630d30831d8ac3f48db90082eabb12 (diff) | |
| parent | 967c039a472254817d774db82996390c42e0283a (diff) | |
| download | pymba-7059da91f84547a18afab8d2d87349aa63cbd782.tar.gz pymba-7059da91f84547a18afab8d2d87349aa63cbd782.zip | |
Merge pull request #58 from seahawk67/master
Searching libVimbaC.so failed
| -rw-r--r-- | pymba/vimbadll.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/pymba/vimbadll.py b/pymba/vimbadll.py index 04fa49f..5ea0288 100644 --- a/pymba/vimbadll.py +++ b/pymba/vimbadll.py @@ -45,27 +45,27 @@ else: if 'x86_64' in os.uname()[4]: assert os.environ.get( "GENICAM_GENTL64_PATH"), "you need your GENICAM_GENTL64_PATH environment set. Make sure you have Vimba installed, and you have loaded the /etc/profile.d/ scripts" - vimba_dir = "/".join(os.environ.get("GENICAM_GENTL64_PATH").split("/") - [1:-3]) + tlPath = [p for p in os.environ.get("GENICAM_GENTL64_PATH").split(":") if p][0] + vimba_dir = "/".join(tlPath.split("/")[1:-3]) vimbaC_path = "/" + vimba_dir + "/VimbaC/DynamicLib/x86_64bit/libVimbaC.so" elif 'x86_32' in os.uname()[4]: print("Warning: x86_32 reached!") assert os.environ.get( "GENICAM_GENTL32_PATH"), "you need your GENICAM_GENTL32_PATH environment set. Make sure you have Vimba installed, and you have loaded the /etc/profile.d/ scripts" - vimba_dir = "/".join(os.environ.get("GENICAM_GENTL32_PATH").split("/") - [1:-3]) + tlPath = [p for p in os.environ.get("GENICAM_GENTL32_PATH").split(":") if p][0] + vimba_dir = "/".join(tlPath.split("/")[1:-3]) vimbaC_path = "/" + vimba_dir + "/VimbaC/DynamicLib/x86_32bit/libVimbaC.so" elif 'arm' in os.uname()[4]: assert os.environ.get( "GENICAM_GENTL32_PATH"), "you need your GENICAM_GENTL32_PATH environment set. Make sure you have Vimba installed, and you have loaded the /etc/profile.d/ scripts" - vimba_dir = "/".join(os.environ.get("GENICAM_GENTL32_PATH").split("/") - [1:-3]) + tlPath = [p for p in os.environ.get("GENICAM_GENTL32_PATH").split(":") if p][0] + vimba_dir = "/".join(tlPath.split("/")[1:-3]) vimbaC_path = "/" + vimba_dir + "/VimbaC/DynamicLib/arm_32bit/libVimbaC.so" elif 'aarch64' in os.uname()[4]: assert os.environ.get( "GENICAM_GENTL64_PATH"), "you need your GENICAM_GENTL64_PATH environment set. Make sure you have Vimba installed, and you have loaded the /etc/profile.d/ scripts" - vimba_dir = "/".join(os.environ.get("GENICAM_GENTL64_PATH").split("/") - [1:-3]) + tlPath = [p for p in os.environ.get("GENICAM_GENTL32_PATH").split(":") if p][0] + vimba_dir = "/".join(tlPath.split("/")[1:-3]) vimbaC_path = "/" + vimba_dir + "/VimbaC/DynamicLib/arm_64bit/libVimbaC.so" else: raise ValueError("Pymba currently doesn't support %s" % os.uname()[4]) |
