pycups module for CUPS prinitng

Viewed 219

I am using the python cups module to list the available destinations. And everything work perfectly. I've installed the pycups using sudo apt-get install pycups.

import cups

conn = cups.Connection()
printers = conn.getPrinters()
for p in printers:
    print(p)
    print(printers[p],["device-uri"])

The problem is that I am not finding a documentation for this module and what are the methods that can be used so can implement other functionalities.

Do you have an idea where I can find the documentation ?

Thank you in advance.

2 Answers

I ran into the same problem. There is one example in their github and that's all I could find. You should probably poke around with a python debugger to learn how the library works.

You can use built-in help function in python interpreter:

>>> import cups
>>> help(cups)
# shows auto-generated documentation for cups module
Related