Printer List from CUPS
djw
dwelch at vcd.hp.com
Thu Sep 8 13:46:03 EDT 2005
Mike Tammerman wrote:
> Hi,
>
> I want to get the printer list from CUPS. I found some ways using
>
> lpstat -p and
> http://localhost:631/printers
>
> but, these ways require some parsing and I am not sure, if the parsing
> works all the time. A pythonic way would be very helpful.
>
> Thanks,
> Mike
>
The HPLIP project (hpinkjet.sf.net) includes a basic CUPS extension
module in the src/prnt/cupsext directory. Its pretty rough, but it will
return a list of CUPS printers easily enough. I am in the process of
rewriting it in Pyrex and hope to include more complete CUPS API coverage.
-Don
More information about the Python-list
mailing list