The io module is present in both python 2 and 3, so does not need to be in the try block.