win32print.EnumPrinters
tuple = EnumPrinters(flags, name , level )
Enumerates printers, print servers, domains and print providers.
Parameters
Comments
Use Flags=PRINTER_ENUM_NAME, Name=None, Level=1 to enumerate print providers.Use Flags=PRINTER_ENUM_NAME, Name=\\servername, Level=2 or 5 to list printers on another server.
See MSDN docs for EnumPrinters for other specific combinations
Return Value
Level 1 returns a tuple of tuples for backward compatibility. Each individual element is a tuple of (flags, description, name, comment)All other levels return a tuple of dictionaries representing PRINTER_INFO_* structures