Skip to content

Conversation

123swk123
Copy link

@123swk123 123swk123 commented Oct 7, 2025

This pull request adds support for the module to search and load the HID dll/so file from the PATH environment variable.

@apmorton
Copy link
Owner

apmorton commented Oct 8, 2025

The ctypes docs specifically recommend against using find_library for this purpose.

If wrapping a shared library with ctypes, it may be better to determine the shared library name at development time, and hardcode that into the wrapper module instead of using find_library() to locate the library at runtime.

It's behavior varies pretty wildly between systems, and at minimum you'd need to drop prefixes/extensions for Linux systems.

What is the actual concrete problem with reproducible steps you're trying to solve here?

cdll.LoadLibrary should already be respecting PATH

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