We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 85a4448 commit a921847Copy full SHA for a921847
microscope/stages/linkam.py
@@ -974,10 +974,9 @@ def get_sdk_version():
974
@staticmethod
975
def init_sdk():
976
"""Initialise the SDK and set up event callbacks"""
977
- try:
978
- __class__._lib = ctypes.WinDLL("LinkamSDK.dll")
979
- except:
980
- # Not tested
+ if os.name == "nt": # is windows
+ __class__._lib = ctypes.CDLL("LinkamSDK.dll")
+ else: # assuming Linux. Not tested.
981
__class__._lib = ctypes.CDLL("libLinkamSDK.so")
982
_lib = __class__._lib
983
"""Initialise the SDK, and create and set the callbacks."""
0 commit comments