[cups.general] Job reporting

Tim Waugh twaugh at redhat.com
Fri Jul 2 09:00:38 PDT 2010


On Fri, 2010-07-02 at 08:41 -0700, Michael Sweet wrote:
> Right now you'll need to write a show program to provide this
> information.

Here's an example using Python and the 'pycups' extension module:

#!/usr/bin/python
import cups, time
c=cups.Connection ()
jobs = c.getJobs (which_jobs="completed")
for job in jobs.values ():
  name = job['job-name']
  created = job['time-at-creation']
  completed = job['time-at-completed']
  print name
  print time.ctime (created)
  print time.ctime (completed) + "\n"

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/20100702/96e49db4/attachment.bin>


More information about the cups mailing list