|
|
@ -88,14 +88,13 @@ class LogPrinter(logging.Handler):
|
|
|
|
|
|
|
|
|
|
|
|
def emit(self, record):
|
|
|
|
def emit(self, record):
|
|
|
|
if (self.printer["inep"] is None) and (self.printer["outep"] is None):
|
|
|
|
if (self.printer["inep"] is None) and (self.printer["outep"] is None):
|
|
|
|
prn = printer.Usb(self.printer["vendorid"], self.printer["productid"],
|
|
|
|
prn = printer.Usb(self.printer["vendorid"], self.printer["productid"])
|
|
|
|
profile=self.printer["profile"])
|
|
|
|
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
prn = printer.Usb(self.printer["vendorid"],
|
|
|
|
prn = printer.Usb(self.printer["vendorid"],
|
|
|
|
self.printer["productid"],
|
|
|
|
self.printer["productid"],
|
|
|
|
in_ep=self.printer["inep"],
|
|
|
|
in_ep=self.printer["inep"],
|
|
|
|
out_ep=self.printer["outep"],
|
|
|
|
out_ep=self.printer["outep"])
|
|
|
|
profile=self.printer["profile"])
|
|
|
|
prn.profile = self.printer["profile"]
|
|
|
|
prn.set()
|
|
|
|
prn.set()
|
|
|
|
msg = self.format(record)
|
|
|
|
msg = self.format(record)
|
|
|
|
#text = textwrap.fill(msg, width=self.printer["textwidth"])
|
|
|
|
#text = textwrap.fill(msg, width=self.printer["textwidth"])
|
|
|
@ -415,14 +414,13 @@ class Bureau(object):
|
|
|
|
"""
|
|
|
|
"""
|
|
|
|
if (self.smprint["inep"] is None) and (self.smprint["outep"] is None):
|
|
|
|
if (self.smprint["inep"] is None) and (self.smprint["outep"] is None):
|
|
|
|
prn = printer.Usb(self.smprint["vendorid"],
|
|
|
|
prn = printer.Usb(self.smprint["vendorid"],
|
|
|
|
self.smprint["productid"],
|
|
|
|
self.smprint["productid"])
|
|
|
|
profile=self.smprint["profile"])
|
|
|
|
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
prn = printer.Usb(self.smprint["vendorid"],
|
|
|
|
prn = printer.Usb(self.smprint["vendorid"],
|
|
|
|
self.smprint["productid"],
|
|
|
|
self.smprint["productid"],
|
|
|
|
in_ep=self.smprint["inep"],
|
|
|
|
in_ep=self.smprint["inep"],
|
|
|
|
out_ep=self.smprint["outep"],
|
|
|
|
out_ep=self.smprint["outep"])
|
|
|
|
profile=self.smprint["profile"])
|
|
|
|
prn.profile = self.smprint["profile"]
|
|
|
|
return prn
|
|
|
|
return prn
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|