Python + ioctl + Windows HOWTO??

Thomas Heller theller at python.net
Thu Oct 30 05:06:22 EST 2003


Javier <no.mail at ever.no> writes:

> Hi all!!
>
> I'm trying to use Python to help in testing software for the Windows
> Platform.
>
> The sw we develop at the company I work for sets up quite a number of
> "new" device drives in Windows, and as part of the testing process I'd
> need to be able to "query" them about their state and suchlike. The
> "interface" for doing so involves opening "device files" (of the form
> \\.\Device\CDCrypto) and sending them ioctls to query their state.
>
> I've been searching / googling for ioctl, and the only mentions I've
> seen are to UNIX-specific modules such as fcntl. My question is, is it
> possible to use similar functions / modules in windows? If so, how?
>
> Thanks a lot

On windows, ioctl is spelled DeviceIoControl (which is wrapped by Mark
Hammonds win32 extensions, or you use ctypes).

Thomas




More information about the Python-list mailing list