I'm trying to set the port of a printer (on Windows 98) but it fails if
the devmode of the printer is NULL.
Here is some sample code:
h= win32print.OpenPrinter("Printername")
settings= win32print.GetPrinter(h, 2)
settings["pPortName"]= r"\\newserver\printer"
win32print.SetPrinter(h, 2, settings, 0)
# setprinter fails because devmode is None
# exception thrown is ValueError - PyDEVMODE cannot be None in this
context
I've confirmed with a little C program that the DevMode is definitely
NULL for the printer.
How can I get around this?
Kelly
_______________________________________________
Python-win32 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-win32