Access denied when attempting to remove printer
问题 def on_printer_button_clicked(self, button): for i in range(len(self.printer_buttons)): if button == self.printer_buttons[i]: pHandle = win32print.OpenPrinter(self.printers[i]['pPrinterName']) win32print.DeletePrinter(pHandle) return So all I'm doing is opening the printer handle and calling the function Delete Printer, as you can see. Here's what I get in the console when I run the function: uninstall_windowGUI.py", line 57, in on_printer_button_clicked win32print.DeletePrinter(pHandle)