Python program to print "hello world" via CUPS?

3.9k Views Asked by At
import cups
conn = cups.Connection()
printers = conn.getPrinters()
printer_name = printers.keys()[0]
conn.printFile(printer_name,'/home/pi/Desktop/tempprint.jpg',"Hello",{}) 

how to printFile change to print text example "hello world"? not file. thank you

0

There are 0 best solutions below