You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm building a wrapper for the new Thorlabs Kinesis drivers using from lantz.foreign import LibraryDriver, and found that by default the class Library loads the dll as:
ifos.name=='nt':
library=ctypes.WinDLL(library)
However, for some reason when I try to call a function, like CC_Open (this is device specific), I get the following error:
This is easily solved if i use library = ctypes.CDLL(library).
I imagine that it is not safe to assume the library loader based solely on the operating system, however I don't see a clear way of overriding it; the class Library is able to do so:
just by providing a library that is not a string (i.e. the library already loaded)
But the base class LibraryDriver iterates over names. I don't see a clear solution that wouldn't ruin downstream code.
The text was updated successfully, but these errors were encountered:
I'm building a wrapper for the new Thorlabs Kinesis drivers using
from lantz.foreign import LibraryDriver
, and found that by default theclass Library
loads the dll as:However, for some reason when I try to call a function, like
CC_Open
(this is device specific), I get the following error:This is easily solved if i use
library = ctypes.CDLL(library)
.I imagine that it is not safe to assume the library loader based solely on the operating system, however I don't see a clear way of overriding it; the class Library is able to do so:
just by providing a library that is not a string (i.e. the library already loaded)
But the base class
LibraryDriver
iterates over names. I don't see a clear solution that wouldn't ruin downstream code.The text was updated successfully, but these errors were encountered: