New submission from Aaron Myles Landwehr:

If I execute the following code, the file descriptor for CONOUT$ has a fileno 
!= 1. With CONIN$ the fileno != 0. Similar code in another language such as 
perl produces the desired results. 

sys.stdout.close();
sys.stdout = open("CONOUT$", "w");
sys.stderr.write(str(sys.stdout.fileno()));

I believe it has to do with the fact that stdout is an object in python and in 
perl or c, you are operating directly on the stream ala freopen() or the 
equivalent.

----------
components: IO
messages: 229690
nosy: snaphat
priority: normal
severity: normal
status: open
title: Incorrect fileno for CONOUT$ / stdout
type: behavior
versions: Python 2.7

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue22673>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to