The documentation for ioctl in the fcntl module says: "ioctl(fd, op, arg) This function is identical to the fcntl() function, except that the operations are typically defined in the library module IOCTL." The only problem I can see is that there is no IOCTL module. I'm looking to get and set the winsize structure for the controlling terminal. Yours, Noah