Search code examples
pythonwinapipywin32

pywin32: how do I get a pyDEVMODE object?


How can I create a PyDEVMODE object without just having it as a return from a function call like win32api.EnumDisplaySettingsEx(name, 0)?


Solution

  • It's defined in pywintypes.

    >>> import pywintypes
    >>> pywintypes.DEVMODEType()
    <PyDEVMODE object at 0x00F38E90>
    

    I'm curious as to what you are going to use it for?