Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where can I find documentation for the pycups module for CUPS printing?

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?

like image 922
ShZnd Avatar asked Sep 16 '25 13:09

ShZnd


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.

like image 51
user8466 Avatar answered Sep 18 '25 10:09

user8466


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

>>> import cups
>>> help(cups)
# shows auto-generated documentation for cups module
like image 20
loloToster Avatar answered Sep 18 '25 08:09

loloToster