Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix load library for PS2000A on OSX. #158

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jpsecher
Copy link

Use the the proper LoadLibraryDarwin and the lib path currently used by PicoScope 6.13 on OSX.

@@ -131,7 +131,8 @@ def __init__(self, serialNumber=None, connect=True):
from ctypes import cdll
self.lib = cdll.LoadLibrary("lib" + self.LIBNAME + ".so")
elif platform.system() == 'Darwin':
self.lib = self.loadLibraryDarwin("lib" + self.LIBNAME + ".dylib")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

was this ta typo?

@@ -14,7 +14,7 @@ def LoadLibraryDarwin(library):

http://ulthiel.com/vk2utl/picoscope-python-interface-under-mac-os-x/
"""
PICO_LIB_PATH = "/Applications/PicoScope6.app/Contents/Resources/lib/"
PICO_LIB_PATH = "/Applications/PicoScope 6.app/Contents/Resources/lib/"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please make this more "backward" compatible?? I understand that Picoscope moved the location of their file.

If you could "try both locations" in a loop or something, that would be better.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I can see, Picoscope changed the path at least 1.5 years ago, so is there anything to be backwards compatible to? Is it possible to install a Picoscope library that uses the old path?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1.5 years is not a long time for instrumentation. often I'll just leave the software at the version I had when I first got the instrument. it's pretty important to me that the old stuff continues to work at least for a few more months.

@hmaarrfk
Copy link
Collaborator

I think alot of this was done in #144, but maybe we got stuck in "perfection".

I can look at cleaning that PR up. unless you want to integreate the essense into it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants