How to get list of all Cups printing options?
When I am printing using this module, I want to specify different options such as no of copies, select page no etc. The options are to be passed in a dictionary as far as I know. But, where can I get list of all the options? i found some in various forums but getting a proper list would be a big help.
When I am printing using this module, I want to specify different options such as no of copies, select page no etc. The options are to be passed in a dictionary as far as I know. But, where can I get list of all the options? i found some in various forums but getting a proper list would be a big help.
You can try the following code
ppdfile = conn.getPPD("printer name")
ppd = cups.PPD(ppdfile)
groups = ppd.optionGroups
for group in groups:
for opt in group.options:
print(opt.keyword + ":" + opt.defchoice)
print(opt.choices)