It's not guaranteed that sys.stdin.fileno() == sys.stdout.fileno().
For example, when I launch python manage.py winfcgi command from PowerShell for debugging purposes, I get ValueError: Cannot open console input buffer for writing precisely because sys.stdin.fileno() != sys.stdout.fileno().
It's not guaranteed that
sys.stdin.fileno() == sys.stdout.fileno()
.For example, when I launch
python manage.py winfcgi
command from PowerShell for debugging purposes, I getValueError: Cannot open console input buffer for writing
precisely becausesys.stdin.fileno() != sys.stdout.fileno()
.