1
0
mirror of https://github.com/python-escpos/python-escpos synced 2025-09-13 09:09:58 +00:00

Added the DLE EOT querying command. (#237)

* 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.
* Update AUTHORS
* Add entry to .mailmap
* currently USB only
This commit is contained in:
csoft2k
2017-07-24 13:57:02 +02:00
committed by Patrick Kanzler
parent 662aa30f4b
commit 89dfb6cf86
5 changed files with 32 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: