Print to Paper

Grant Edwards grant.b.edwards at gmail.com
Fri Oct 4 19:40:06 EDT 2019


On 2019-10-04, Daniel <duram at terra.com.br> wrote:

> How to do a code to print to paper?  please post here a "Hello World" 
> code to be printed on paper with an inkjet.

    os.popen('lpr','w').write('Hello World\n')

That's a bit old-school -- you should probably use subprocess.Popen
instead.






More information about the Python-list mailing list