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 -- http://mail.python.org/mailman/listinfo/python-list