writing to lpr printer

François Pinard pinard at iro.umontreal.ca
Wed Aug 9 09:40:05 EDT 2000


[Bob van der Poel]

> In tcl I can do things like:

> 	open("|lpr", 'w') 

> and tcl will open a pipe to lpr. The open in python doesn't behave this
> way...and I was very spoiled with the tcl varient. Is there an easy way
> to emulate this, or do I have to parse the filename looking for a
> leading '|', etc.?

Can't we easily live with:

   import os
   os.popen('lpr', 'w')

-- 
François Pinard   http://www.iro.umontreal.ca/~pinard




More information about the Python-list mailing list