1
0
mirror of https://github.com/python-escpos/python-escpos synced 2025-12-02 09:43:30 +00:00

Added the DLE EOT querying command.

Added a function to check whether the printer is online or not, as well
as a reading method for USB printers.
This commit is contained in:
K
2017-07-22 02:37:33 +02:00
committed by csoft2k
parent 962208063b
commit 574d6d86fa
3 changed files with 23 additions and 0 deletions

View File

@@ -84,6 +84,10 @@ class Usb(Escpos):
"""
self.device.write(self.out_ep, msg, self.timeout)
def _read(self):
""" Reads a data buffer and returns it to the caller. """
return self.device.read(self.in_ep, 16)
def close(self):
""" Release USB interface """
if self.device: