Python program to print "hello world" via CUPS?

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

Upvotes: 2

Views: 4136

Answers (0)

Related Questions