pycups
This page is about the Python bindings for the CUPS API, known as pycups. It was written for use with system-config-printer, but can be put to other uses as well.
I work on this module as part of my job at Red Hat.
Download
Download tarball releases from:
http://cyberelk.net/tim/data/pycups/
or from the Python Package Index:
http://pypi.python.org/pypi/pycups
Source Code
Fetch the source like this:
git clone git://git.fedorahosted.org/git/pycups.git
or browse it using gitweb.
New releases are announced at freshmeat.
Documentation
Documentation is produced using epydoc and hosted at the pycups PyPI page.
Bug Reporting
Report bugs using the trac interface.
Discussion
Discussion of pycups is welcome on the system-config-printer mailing list.
Thanks for pointing out these issues.
Modified the fgets code to avoid compiler warnings and also removes the new line character that comes along with fgets.
I cleanup with the commit history to push to github earlier. I shouldn’t have done that. I overwrote my previous commits to keep the index intact. I lost some of the interim commits(No big deal!)
https://github.com/narisipalli/pycups/commits/
Heres the full commit of my changes-
https://github.com/narisipalli/pycups/commit/4a857c31a40222b7c78e732d2a1769348039b06e
Thanks, merged.
Thanks. When are you planning to push the tar of the new version 1.9.58?
I’ll probably get to it this week.
macaronij: the new 1.9.58 release is now registered at PyPI and the documentation is there as well. See links in the main page, above.
$ gpg –verify pycups-1.9.58.tar.bz2.asc
gpg: Signature made Tue Jul 26 13:28:58 2011 CEST using RSA key ID F4DE942C
gpg: BAD signature from “Tim Waugh “
I had to update Makefile for Source Mage GNU/Linux. You changed in this version ln -sf to mv for cups.so, I had to change it back.
sed -i ‘s:mv build/lib:ln -sf build/lib:’ Makefile
Source Mage commit:
http://scmweb.sourcemage.org/gitweb.cgi?p=smgl/grimoire.git;a=commitdiff;h=d831437ebbebfa020aa4176058f8c565e1a41908;hp=f31d661af73c9265c983523514dc615d60eb0e16
GPG signature fixed: the signature I still had here on disk was the same, most likely a memory issue that was fixed in the last few weeks.
I’ve applied your other change.
I tried posting a ticket on trac but there’s no registration page ?
Anyway, requested_attributes doesn’t seem to work in Connection.getJobs(). It will always return an empty dict. It works with getJobAttributes though. Let me know if you need more details.
While I’m at it: your software is awesome
I added print support with full option handling to my django web app in a day of coding. Thanks a bunch!
The registration is the Fedora Project registration.
What version of CUPS are you running? That might very well make the difference…
Sorry I forgot to mention: 1.9.51-0ubuntu2
If that’s fixed in a newer version sorry for bothering, otherwise I’ll open a ticket when I get back at the office on monday.
That’s a pycups version number; what about CUPS? pycups just returns whatever CUPS tells it to.
cups is 1.4.4-6ubuntu2.3
I’m using ubuntu 10.04.3 LTS.
[...] pycups [...]
[...] PyCups (http://cyberelk.net/tim/software/pycups/) [...]