from escpos.connections import getFilePrinter printer = getFilePrinter()(dev='/dev/usb/lp0') printer.text("Hello World") printer.lf()