This is a universalish python driver for USB POS thermal printers. Simply run it and start typing and every newline it will be sent to the printer. Also supports input from stdin. Most printers also support ESP-POS, for which there are special commands implemented.
#@!START-ESC = start respecting ESC commands, also resets any set parameters
#@!CUT = Cut paper
#@!BOLD1 / #@!BOLD0 = Bold on/off
#@!UNDER1 / #@!UNDER0 = Underline on/off
#@!DOUBLEW / #@!NORMALW = Double / normal width (does not stack with underline nor double height)
Forked from https://github.com/vpatron/usb_receipt_printer