This particular printer is USB connected and powered off. Windows 7 x64 shows it to be "offline" in "Devices & Printers". But both of these return status 0 in the dict.
~~~~~~
h = win32print.OpenPrinter('Samsung CLP-310 Series', None)
samsung = win32print.GetPrinter(h, 2)
pprint(samsung)
printers = win32print.EnumPrinters(win32print.PRINTER_ENUM_CONNECTIONS+
win32print.PRINTER_ENUM_LOCAL, None, 2)
pprint(printers)
~~~~~~
Snipped output for both:
{ ...
'Status': 0,
}
But if I manually put the printer offline via Windows, it returns PRINTER_STATUS_OFFLINE as expected.
Is there any way to get a status returned that truly reflects the state of the printer?
I'm using pywin32-218 with python 2.7.6 x32 on Windows x64.
Same problem for me (except is with a HP printer) :
Windows 10 Pro 64, build 16299.
Python 3.6.3
Pywin 220