I've been using the win32print module for Python to try to get various information about sets of printers, such as driver name, job count, port being used, status, etc. It's been mostly successful, however I am having a lot of trouble making any use of the status code that win32print returns from the API.
I've been using the win32print.GetPrinter method, which returns a PRINTER_INFO_ dictionary, with one mapping being Status. However, it isn't documented what status code corresponds to what printer status. It seems that 0 is idle, 1 is paused, but other than that I'm not sure what it means.
When I looked up values of constants for the windows 32bit API, I found this page, but none of the status codes I ever get back seem to match that. Often times, I get a status code like 1052800 (got that one from an Epson printer), which is not on the list from the win32api constants.
I have also tried using WMI modules to do this with even less success.
I would like to get printer status codes for printer out of paper, printer door open, toner low, paper jam, etc. Does anyone have any tips on where to find what these status codes mean, or even a better solution to finding printer status completely?