[issue2712] enhanced ioctl

Martin v. Löwis report at bugs.python.org
Tue Apr 29 00:55:45 CEST 2008

Martin v. Löwis <martin at v.loewis.de> added the comment:

Passing structures is certainly possible. I'd try

args = struct.pack("iP", len(c), cast (pointer (c), c_void_p).value)
fcntl.ioctl(fd, request, args)


args = eos_dl_args_t()
args_p = cast(pointer(args), c_void_ptr).value
fcntl.ioctl(fd, request, args_p)

should also work, IIUC.

Tracker <report at bugs.python.org>

More information about the Python-bugs-list mailing list