Windows Printing using win32print

KellyK kelly.kranabetter at gems6.gov.bc.ca
Tue Jun 26 14:11:58 EDT 2001


On Mon, 25 Jun 2001 19:35:59 -0700, "Emile van Sebille"
<emile at fenx.com> wrote:

>I'm not sure if this helps with your specific problem is, but I can say that
>you need to figure out the name the printer goes by.  I've seen different
>names for printers working with various applications in windows.  Here are
>two examples that I'm currently using.
<snip>

Something like this will list the names of network connected and local
printers:

for p in win32print.EnumPrinters(win32print.PRINTER_ENUM_CONNECTIONS):
  print p[2]

for p in win32print.EnumPrinters(win32print.PRINTER_ENUM_LOCAL):
  print p[2]

Full documentation on EnumPrinters is on Microsoft's site
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/hh/gdi/prntspol_9fjn.asp




More information about the Python-list mailing list