Skip to content

Conversation

@jdranczewski
Copy link

Hi! I'm working on publishing a lab automation interface that uses this package, thanks a lot for making it! For a GUI application, I find it important to be able to connect/disconnect from the hardware dynamically. While the architecture of APT doesn't allow a clean disconnect (APTCleanup removes all connections rather than a specific one), I still find it valuable to have this option, and have been using a poorly patched version of this library to achieve it.

Now that I'm working on making our automation suite more proper and public, I would love to make the library load / cleanup actions public members of this package's API, so that the monkey patch is not required to use my interface. The logic flow of the proposed changes basically just makes sure that the _lib variable can be reused - let me know if you think this would work well!

This is adjacent to #6, basically just making this a public API and making re-loading more graceful.

Only reload if not already loaded
Calling load_library in any context should update the global _lib
@jdranczewski
Copy link
Author

We could also perhaps add aliases to not break legacy code:

_load_library = load_library
_cleanup = cleanup

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.

1 participant