mirror of
https://github.com/python-escpos/python-escpos
synced 2025-08-24 09:03:34 +00:00
DOC change type of msg for _raw to bytes
This commit is contained in:
@@ -52,6 +52,7 @@ class Escpos(object):
|
||||
This function has to be individually implemented by the implementations.
|
||||
|
||||
:param msg: message string to be sent to the printer
|
||||
:type msg: bytes
|
||||
"""
|
||||
pass
|
||||
|
||||
|
@@ -79,6 +79,7 @@ class Usb(Escpos):
|
||||
""" Print any command sent in raw format
|
||||
|
||||
:param msg: arbitrary code to be printed
|
||||
:type msg: bytes
|
||||
"""
|
||||
self.device.write(self.out_ep, msg, self.interface)
|
||||
|
||||
@@ -143,6 +144,7 @@ class Serial(Escpos):
|
||||
""" Print any command sent in raw format
|
||||
|
||||
:param msg: arbitrary code to be printed
|
||||
:type msg: bytes
|
||||
"""
|
||||
self.device.write(msg)
|
||||
|
||||
@@ -201,6 +203,7 @@ class Network(Escpos):
|
||||
""" Print any command sent in raw format
|
||||
|
||||
:param msg: arbitrary code to be printed
|
||||
:type msg: bytes
|
||||
"""
|
||||
self.device.sendall(msg)
|
||||
|
||||
@@ -247,6 +250,7 @@ class File(Escpos):
|
||||
""" Print any command sent in raw format
|
||||
|
||||
:param msg: arbitrary code to be printed
|
||||
:type msg: bytes
|
||||
"""
|
||||
if type(msg) is str:
|
||||
self.device.write(msg.encode())
|
||||
|
Reference in New Issue
Block a user