Printer List from CUPS

djw dwelch at
Thu Sep 8 19:46:03 CEST 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 ( 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.


More information about the Python-list mailing list