Do the check for lacking sys.stdin.fileno() *before* testing for
Windows. If sys.stdin doesn't appear to be a real file (characterized by having a working fileno()), don't use any console specific methods -- go straight to the default.
Showing
Please register or sign in to comment