Example #1
0
class Printer:
    def __init__(self, *args, **kwargs):
        self.driver = ThermalPrinter(*args, **kwargs)

    def print_text(self, msg, *args, **kwargs):
        msg = msg.encode('utf8')
        return self.driver.print_text(msg, *args, **kwargs)

    def linefeed(self, *args, **kwargs):
        return self.driver.linefeed(*args, **kwargs)

    def print_message(self, text, final_line_breaks=3):
        self.print_text(text)
        for x in range(final_line_breaks):
            self.linefeed()
Example #2
0
class Printer:

    def __init__(self, *args, **kwargs):
        self.driver = ThermalPrinter(*args, **kwargs)

    def print_text(self, msg, *args, **kwargs):
        msg = msg.encode('utf8')
        return self.driver.print_text(msg, *args, **kwargs)

    def linefeed(self, *args, **kwargs):
        return self.driver.linefeed(*args, **kwargs)

    def print_message(self, text, final_line_breaks=3):
        self.print_text(text)
        for x in range(final_line_breaks):
            self.linefeed()
Example #3
0
 def __init__(self, *args, **kwargs):
     self.driver = ThermalPrinter(*args, **kwargs)
Example #4
0
 def __init__(self, *args, **kwargs):
     self.driver = ThermalPrinter(*args, **kwargs)