[cups.general] ink and toner level with cups

Tim Waugh twaugh at redhat.com
Fri Jan 7 08:52:00 PST 2011


On Fri, 2011-01-07 at 08:25 -0800, Michael Sweet wrote:
> Also, you can write a small notifier program (maybe even a Python
> script if Tim has exposed the necessary bits to read an IPP message
> from stdin) to monitor printer state changes and send a notification
> when the printer-state-reasons contains one of the toner or
> marker-supply keywords.

Yes, pycups has a method to read IPP data (since 1.9.52):

r=cups.IPPRequest()
r.readIO(read_fn) # e.g. r.readIO(file("c00046").read)
print r.attributes

Tim.
*/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part
URL: <https://lists.cups.org/pipermail/cups/attachments/20110107/d51faa67/attachment.bin>


More information about the cups mailing list