From 7005ba58990861360be58fb14e81540e39ff6055 Mon Sep 17 00:00:00 2001 From: Patrick Kanzler Date: Thu, 3 Mar 2016 03:37:43 +0100 Subject: [PATCH] DOC change type of msg for _raw to bytes --- escpos/escpos.py | 1 + escpos/printer.py | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/escpos/escpos.py b/escpos/escpos.py index b55ee12..531ebbb 100644 --- a/escpos/escpos.py +++ b/escpos/escpos.py @@ -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 diff --git a/escpos/printer.py b/escpos/printer.py index 85eb553..de54cf9 100644 --- a/escpos/printer.py +++ b/escpos/printer.py @@ -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())