How to use the picoscope.darwin_utils.LoadLibraryDarwin function in picoscope

To help you get started, we’ve selected a few picoscope examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github colinoflynn / pico-python / picoscope / ps5000a.py View on Github external
def __init__(self, serialNumber=None, connect=True):
        """Load DLL etc."""
        if platform.system() == 'Linux':
            from ctypes import cdll
            self.lib = cdll.LoadLibrary("lib" + self.LIBNAME + ".so")
        elif platform.system() == 'Darwin':
            from picoscope.darwin_utils import LoadLibraryDarwin
            self.lib = LoadLibraryDarwin("lib" + self.LIBNAME + ".dylib")
        else:
            from ctypes import windll
            self.lib = windll.LoadLibrary(str(self.LIBNAME + ".dll"))

        self.resolution = self.ADC_RESOLUTIONS["8"]

        super(PS5000a, self).__init__(serialNumber, connect)
github colinoflynn / pico-python / picoscope / ps4000.py View on Github external
def __init__(self, serialNumber=None, connect=True):
        """Load DLLs."""
        self.handle = None
        if platform.system() == 'Linux':
            from ctypes import cdll
            # ok I don't know what is wrong with my installer,
            # but I need to include .so.2
            self.lib = cdll.LoadLibrary("lib" + self.LIBNAME + ".so.2")
        elif platform.system() == 'Darwin':
            from picoscope.darwin_utils import LoadLibraryDarwin
            self.lib = LoadLibraryDarwin("lib" + self.LIBNAME + ".dylib")
        else:
            from ctypes import windll
            self.lib = windll.LoadLibrary(str(self.LIBNAME + ".dll"))

        super(PS4000, self).__init__(serialNumber, connect)
        # check to see which model we have and use special functions if needed

        unit_number = self.getUnitInfo('VariantInfo')
        if unit_number == '4262':
            self.getTimestepFromTimebase = self._getTimestepFromTimebase4262
            self.getTimeBaseNum = self._getTimeBaseNum4262
        elif unit_number in {'4223', '4224', '4423', '4424'}:
            self.getTimestepFromTimebase = self._getTimestepFromTimebase4223
            self.getTimeBaseNum = self._getTimeBaseNum4223
        else:
            raise NotImplementedError('Timebase functions have not been '
github colinoflynn / pico-python / picoscope / ps3000a.py View on Github external
def __init__(self, serialNumber=None, connect=True):
        """Load DLL etc."""
        if platform.system() == 'Linux':
            from ctypes import cdll
            self.lib = cdll.LoadLibrary("lib" + self.LIBNAME + ".so")
        elif platform.system() == 'Darwin':
            from picoscope.darwin_utils import LoadLibraryDarwin
            self.lib = LoadLibraryDarwin("lib" + self.LIBNAME + ".dylib")
        else:
            from ctypes import windll
            self.lib = windll.LoadLibrary(str(self.LIBNAME + ".dll"))

        self.resolution = self.ADC_RESOLUTIONS["8"]

        super(PS3000a, self).__init__(serialNumber, connect)
github colinoflynn / pico-python / picoscope / ps2000.py View on Github external
def __init__(self, serialNumber=None, connect=True):
        """Load DLL etc."""
        if platform.system() == 'Linux':
            from ctypes import cdll
            self.lib = cdll.LoadLibrary("lib" + self.LIBNAME + ".so")
        elif platform.system() == 'Darwin':
            from picoscope.darwin_utils import LoadLibraryDarwin
            self.lib = LoadLibraryDarwin("lib" + self.LIBNAME + ".dylib")
        else:
            from ctypes import windll
            self.lib = windll.LoadLibrary(str(self.LIBNAME + ".dll"))

        super(PS2000, self).__init__(serialNumber, connect)
github colinoflynn / pico-python / picoscope / ps6000.py View on Github external
def __init__(self, serialNumber=None, connect=True):
        """Load DLLs."""
        if platform.system() == 'Linux':
            from ctypes import cdll
            # ok I don't know what is wrong with my installer,
            # but I need to include .so.2
            self.lib = cdll.LoadLibrary("lib" + self.LIBNAME + ".so.2")
        elif platform.system() == 'Darwin':
            from picoscope.darwin_utils import LoadLibraryDarwin
            self.lib = LoadLibraryDarwin("lib" + self.LIBNAME + ".dylib")
        else:
            from ctypes import windll
            self.lib = windll.LoadLibrary(str(self.LIBNAME + ".dll"))

        super(PS6000, self).__init__(serialNumber, connect)
github colinoflynn / pico-python / picoscope / ps4000a.py View on Github external
def __init__(self, serialNumber=None, connect=True):
        """Load DLLs."""
        self.handle = None

        if platform.system() == 'Linux':
            from ctypes import cdll
            # ok I don't know what is wrong with my installer,
            # but I need to include .so.2
            self.lib = cdll.LoadLibrary("lib" + self.LIBNAME + ".so.2")
        elif platform.system() == 'Darwin':
            from picoscope.darwin_utils import LoadLibraryDarwin
            self.lib = LoadLibraryDarwin("lib" + self.LIBNAME + ".dylib")
        else:
            from ctypes import windll
            self.lib = windll.LoadLibrary(str(self.LIBNAME + ".dll"))

        self.resolution = self.ADC_RESOLUTIONS["12"]

        super(PS4000a, self).__init__(serialNumber, connect)