Printing to printer

Steve M steve at myplace.com
Fri Aug 12 23:58:11 CEST 2005


Kristian Zoerhoff wrote:

> On 8/11/05, Steve M <steve at myplace.com> wrote:
>> Kristian Zoerhoff wrote:
>> 
>> > On 8/11/05, Steve M <steve at myplace.com> wrote:
>> >> Hello,
>> >>
>> >>        I'm having problems sending information from a python
>> >> script to a printer. I was wondering if someone might send me
>> >> in the right direction. I wasn't able to find much by Google
>> >
>> > Which platform? Directions will vary wildly.
>> >
>> Ooops, sorry forgot to mention I'm using Suse 9.0 and Python 2.3x
> 
> Assuming a local printer, you could just open the appropriate
> device file (e.g. /dev/lp0) in write mode and write the text to it.
> Another option would be to create a temp file, and then feed that
> to the lpr or enscript commands via the subprocess module.
> 

Thank you for your help. I try and work it out now that I have a
direction.

Steve



More information about the Python-list mailing list