(self)
return cmd
converts the current style to an escpos command string
converts the current style to an escpos command string
converts the current style to an escpos command string
def to_escpos(self):
        """ converts the current style to an escpos command string """
        cmd = ''
        ordered_cmds = sorted(self.cmds, key=lambda x: self.cmds[x]['_order'])
        for style in ordered_cmds:
            cmd += self.cmds[style][self.get(style)]
        return cmd
def to_escpos ( self ) : cmd = '' ordered_cmds = sorted ( self . cmds , key = lambda x : self . cmds [ x ] [ '_order' ] ) for style in ordered_cmds : cmd += self . cmds [ style ] [ self . get ( style ) ] return cmd