implement read for Serial

This commit is contained in:
Patrick Kanzler 2017-08-01 11:20:00 +02:00 committed by GitHub
parent b494c9a4bd
commit df1193ab35
1 changed files with 4 additions and 0 deletions

View File

@ -155,6 +155,10 @@ class Serial(Escpos):
"""
self.device.write(msg)
def _read(self):
""" Reads a data buffer and returns it to the caller. """
return self.device.read(16)
def close(self):
""" Close Serial interface """
if self.device is not None and self.device.is_open: