DOC change type of msg for _raw to bytes
This commit is contained in:
parent
18518fa901
commit
7005ba5899
|
@ -52,6 +52,7 @@ class Escpos(object):
|
||||||
This function has to be individually implemented by the implementations.
|
This function has to be individually implemented by the implementations.
|
||||||
|
|
||||||
:param msg: message string to be sent to the printer
|
:param msg: message string to be sent to the printer
|
||||||
|
:type msg: bytes
|
||||||
"""
|
"""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
|
@ -79,6 +79,7 @@ class Usb(Escpos):
|
||||||
""" Print any command sent in raw format
|
""" Print any command sent in raw format
|
||||||
|
|
||||||
:param msg: arbitrary code to be printed
|
:param msg: arbitrary code to be printed
|
||||||
|
:type msg: bytes
|
||||||
"""
|
"""
|
||||||
self.device.write(self.out_ep, msg, self.interface)
|
self.device.write(self.out_ep, msg, self.interface)
|
||||||
|
|
||||||
|
@ -143,6 +144,7 @@ class Serial(Escpos):
|
||||||
""" Print any command sent in raw format
|
""" Print any command sent in raw format
|
||||||
|
|
||||||
:param msg: arbitrary code to be printed
|
:param msg: arbitrary code to be printed
|
||||||
|
:type msg: bytes
|
||||||
"""
|
"""
|
||||||
self.device.write(msg)
|
self.device.write(msg)
|
||||||
|
|
||||||
|
@ -201,6 +203,7 @@ class Network(Escpos):
|
||||||
""" Print any command sent in raw format
|
""" Print any command sent in raw format
|
||||||
|
|
||||||
:param msg: arbitrary code to be printed
|
:param msg: arbitrary code to be printed
|
||||||
|
:type msg: bytes
|
||||||
"""
|
"""
|
||||||
self.device.sendall(msg)
|
self.device.sendall(msg)
|
||||||
|
|
||||||
|
@ -247,6 +250,7 @@ class File(Escpos):
|
||||||
""" Print any command sent in raw format
|
""" Print any command sent in raw format
|
||||||
|
|
||||||
:param msg: arbitrary code to be printed
|
:param msg: arbitrary code to be printed
|
||||||
|
:type msg: bytes
|
||||||
"""
|
"""
|
||||||
if type(msg) is str:
|
if type(msg) is str:
|
||||||
self.device.write(msg.encode())
|
self.device.write(msg.encode())
|
||||||
|
|
Loading…
Reference in New Issue