0

I was wondering if it is possible to print out a physical document out of a printer with python. Wherever I look in google it talks about printing out something in the actual code. Any Ideas? Basically I want python to log all this data and then once a day print it out. The os I am using is Linux.

jped
  • 486
  • 6
  • 19

1 Answers1

0

First, you need to figure out how to print a document to the printer using the command line, e.g. using the lpr command. Then, you can use os.system to call the print command from your script:

import os
os.system('lpr <here you need to find out about the arguments>')
Colin Bernet
  • 1,354
  • 9
  • 12