mirror of
https://github.com/python-escpos/python-escpos
synced 2025-09-13 09:09:58 +00:00
Add flush function
* Flushing the file will cause the driver to flush the cache and print * the whole buffer.
This commit is contained in:
@@ -176,6 +176,10 @@ class File(Escpos):
|
|||||||
if self.device is None:
|
if self.device is None:
|
||||||
print("Could not open the specified file %s" % self.devfile)
|
print("Could not open the specified file %s" % self.devfile)
|
||||||
|
|
||||||
|
def flush(self):
|
||||||
|
"""Flush printing content"""
|
||||||
|
self.device.flush()
|
||||||
|
|
||||||
|
|
||||||
def _raw(self, msg):
|
def _raw(self, msg):
|
||||||
""" Print any command sent in raw format """
|
""" Print any command sent in raw format """
|
||||||
|
Reference in New Issue
Block a user