Skip to content

Instantly share code, notes, and snippets.

@vinhjaxt
Created December 4, 2023 17:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vinhjaxt/f764adbe6ac8db4f080ae359dd85a673 to your computer and use it in GitHub Desktop.
Save vinhjaxt/f764adbe6ac8db4f080ae359dd85a673 to your computer and use it in GitHub Desktop.
import escpos.printer as printer
cups_conn = printer.CupsPrinter(host="192.168.2.1",port=631,printer_name="XP-58IIH") # Default CUPS printer
cups_conn.textln("Hello CUPS!") # or any python-escpos command
cups_conn.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment