The answer to this question is probably very simple, but I can't seem to get it to work, and the documnetation is very sparse for these functions for some reason. I need to read a linux device file until there is nothing left to read for 0.1 second. I know that I need to use a selector, but I can't for the life of me work out how to get the file descriptor from the file object created with the open command.
So how do I get a file descriptor for use with selector.registerHandle() from a file object created with open()?