I've just pushed a change to the pycups repository that indicates the
general direction I'd like to take the pycups interface.
Generally, IPP responses are returned as dicts, with the attribute names
being the keys and the attribute values being the values. For specific
attribute values that are known to be lists, the values are encoded as
lists even if there is only one value in the list; other values are
encoded as a single object.
This is hard to get right in pycups, and hard to predict in applications
that use it. I'd like to make it much more consistent.
To that end, I'd like to have all attribute values encoded as lists,
even if there is only one value and only ever could be.
This is how cups.Connection.getPPDs2() behaves.
>> from pprint import pprint
>> import cups
>> c=cups.Connection()
>> p=c.getPPDs2()
>> pprint(p[p.keys()[0]])
{'ppd-device-id': [u''],
'ppd-make': [u'Epson'],
'ppd-make-and-model': [u'Epson Stylus Photo 2200 - CUPS+Gutenprint
v5.2.5 Simplified'],
'ppd-model-number': [0],
'ppd-natural-language': [u'en'],
'ppd-product': [u''],
'ppd-psversion': [u''],
'ppd-type': [u'postscript']}
The old behaviour is still present, for compatibility, in
cups.Connection.getPPDs().
Tim.
*/