[cups.general] Getting the list of available printers/classes - from Pure Python?

Tim Waugh twaugh at redhat.com
Fri Feb 17 07:36:42 PST 2006


On Fri, Feb 17, 2006 at 10:11:17AM -0500, Erik Forsberg wrote:

> Hi!
> 
> I'd like to get hold of the list of available printers from a python
> program, without using a C extension (that is, I don't want to link to
> the standard cups C libraries). The reason for not linking to the C
> libraries is that it's much harder to distribute the software when it
> needs C extensions (which are python-version-specific, IIRC).
> 
> Any ideas on this? Is there a binary always present on a host with
> CUPS installed I can run and parse output from? Should I talk directly
> to CUPS on 127.0.0.1:631 and issue a IPP request? 

There are at least two CUPS extension modules for Python:

* Fedora Core's printer configuration tool provides one named
  'pycups'

* The new HPLIP project provides one named 'cupsext'

On an up-to-date Fedora Core 4 installation, for instance, you can try
them both out:

import pycups
import cupsext

They are both about as primitive as one another. :-/

As it happens, I am working on a more comprehensive set of Python
bindings for CUPS right now.

Is there anyone else out there doing something similar?

Tim.
*/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <https://lists.cups.org/pipermail/cups/attachments/20060217/9ddb7a09/attachment.bin>


More information about the cups mailing list