Printer List from CUPS

Martin Franklin mfranklin1 at gatwick.westerngeco.slb.com
Thu Sep 8 13:08:42 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
> 

Just for fun I tried this on my Fedora core 4 box

[~]$ python
Python 2.4.1 (#1, May 16 2005, 15:19:29)
[GCC 4.0.0 20050512 (Red Hat 4.0.0-5)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
 >>> import pycups
 >>>

so I guess if you are on a redhat based distro there is hope...





More information about the Python-list mailing list