[issue10345] fcntl.ioctl always fails claiming an invalid fd

Ned Deily report at bugs.python.org
Sun Nov 21 22:19:48 CET 2010

Ned Deily <nad at acm.org> added the comment:

If you call ioctl with the mutate_flag True, you need to pass "an object supporting the read-write buffer protocol" as the arg parameter for the results of ioctl to be returned in.  In your example, you pass a bytes object which is immutable.  Try using a bytearray object instead, which is mutable, or, for instance, an array object as shown in the documentation.




Python tracker <report at bugs.python.org>

More information about the Python-bugs-list mailing list