I'm trying to get the online/offline status of a printer, and using WMI I'm
finding it very slow. Here's the code I'm working, maybe there's some way to
opimize it? Or some other way? I'm able to use win32print to query the status
of an online printer, but not to find out whether its online or not (its
pStatus always returns 'Idle').
def check_printer(printer_name):
.....c = wmi.WMI ()
.....for p in c.Win32_Printer():
..........if p.caption == printer_name:
...............if p.WorkOffline:
..................print "its offline"
...............else:
..................print "its online"
_______________________________________________
python-win32 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-win32