def removePrinterOption(self, option): cups.openPPD(self.cur_printer) try: cups.removeOption(option) cups.setOptions() finally: cups.closePPD()
def setPrinterOption(self, option, value): cups.openPPD(self.cur_printer) try: cups.addOption("%s=%s" % (option, value)) cups.setOptions() finally: cups.closePPD()