As with many of the other functions in the fcntl and os modules, ioctl
is a thin wrapper around the OS system call of the same name. If you consult the manpage for that system call you will see that it's an integer.
The additional argument (after op
) to ioctl
could be just about anything. ioctl
has notoriously variable arguments that depend on exactly what the request is and even what piece of kernel or driver code receives and processes the request. Difference drivers can even reuse the integer values of op
to mean different things (although they're encouraged to coordinate to avoid this kind of duplication).