[python-win32] Re: StartDoc failed
rwupole at msn.com
Tue Feb 22 06:06:30 CET 2005
PRINTER_ENUM_DEFAULT only works on Windows 95/98.
should get a handle that you can pass to GetPrinter.
----- Original Message -----
From: "Luc Saffre" <luc.saffre at gmx.net>
To: "Roger Upole" <rwupole at msn.com>
Cc: <python-win32 at python.org>
Sent: Monday, February 21, 2005 11:43 PM
Subject: Re: [python-win32] Re: StartDoc failed
> On 22.02.2005 01:14, Roger Upole wrote:
>> You should be able to use win32print.GetPrinter to check
>> the state. Either the status or the attributes (or both) should
>> change when it's not available. (Atributes are element 13
>> of the returned tuple, Status is element 18)
> Roger, thanks for the hint. I saw that GetPrinter() needs a handle, which
> I can find out -as I suppose- using EnumPrinters().
> Unfortunately, EnumPrinters(PRINTER_ENUM_DEFAULT) seems to not work. It
> always raises:
> pywintypes.error: (0, 'EnumPrinters', 'No error message is available')
> even if the default printer is defined and ready.
> I'd guess that EnumPrinters() does not forward PRINTER_ENUM_DEFAULT
> correctly, because for example EnumPrinters(PRINTER_ENUM_LOCAL) works
More information about the Python-win32