ogelpre / labelprinterkit

Apache License 2.0
16 stars 6 forks source link

PyUSBBackend Linux Kernel Management - fix Resource Busy USBError #7

Open ben-burwood opened 2 months ago

ben-burwood commented 2 months ago

Great work on this project, it's been perfect for me!

I've been working with it a fair bit and have developed a few changes that help in use.

This change adds a helper Method to the PyUSBBackend which Detaches the Device from the Kernel and Reconnects - giving PyUSB Exclusive Access to the Printer. I have found that this is required to fix: usb.core.USBError: [Errno 16] Resource busy.

Not sure if you're accepting PRs but happy to contribute the changes I've made which help with useability of the Library.