[plug] Python
David Dartnall
darts at dialix.com.au
Wed Jul 20 15:16:35 WST 2005
Craig Ringer wrote:
>On Tue, 2005-07-19 at 13:25 +0800, David Dartnall wrote:
>
>
>>Maybe a bit OT, but I'm trying to learn to program with Python in
>>conjunction with Lantangen's Scripting Slides, Python Documentation and
>>pydoc...
>>And I can't seem to find how to redirect output to the printer...
>>
>>
>
>
>
>>>>PRINTER_NAME="officehp"
>>>>PRINTER_COMMAND="lp -d%s" % PRINTER_NAME
>>>>import os
>>>>help(os.popen)
>>>>
>>>>
>
>If you need to do really funky things you can look at a PostScript
>library or consider using ReportLab (which will generate PDF that CUPS
>will happily print). You could even look at bindings for
>libcups-client . Frankly though, for many cases just dumping plain text
>to the printer is enough.
>
>--
>Craig Ringer
>
>_______________________________________________
>PLUG discussion list: plug at plug.org.au
>http://www.plug.org.au/mailman/listinfo/plug
>Committee e-mail: committee at plug.linux.org.au
>
>
>
>
Thanks Craig that'll give me a lead
Dave Dartnall
More information about the plug
mailing list