Open Lion3000 opened 2 years ago
ok, it comes from bad implementation of inheritance:
commandSetModule = importlib.import_module('..commandset.' + commandSet.lower(), __name__)
commandSetClass = getattr(commandSetModule, commandSet)
class NetworkPrinter(commandSetClass):
def __init__(self, host, port=9100, initialize=True):
self.host = host
self.port = port
self.__open()
if initialize:
self.initialize()
The constructor of the class Generic is never called !!!! So "_usePrintMode" and other are never initialized
class Generic():
def __init__(self):
# Command code configurations
self._usePrintMode = False
self._textFont = 'a'
self._textBold = False
self._textUnderline = False
self._textDoubleHeight = False
self._textDoubleWidth = False
Hello I fond an issue, When I use printer.bold() or printer.doubleWidth()
Using getNetworkPrinter