Closed Abhi0725 closed 3 years ago
Just found that discover
in brother_ql.backends.helpers
can be used to "discover" Brother devices that are connected. A sample code for anyone who needs it:
from brother_ql.backends.helpers import discover
...
available_devices = discover(backend_identifier='pyusb')
if len(available_devices):
print("Printers available!")
else :
print("No printer available!")
Closing this issue.
I found that the code will throw "Device not found" error when the device isn't connected. But this error is only at the runtime. Can we detect the device connection without triggering print job?