[issue22673] Incorrect fileno for CONOUT$ / stdout

2014-10-19 Thread Aaron Myles Landwehr
Aaron Myles Landwehr added the comment: Note, I just read eryksun's response. That does indeed fix the issues without API changes. -- ___ Python tracker <http://bugs.python.org/is

[issue22673] Incorrect fileno for CONOUT$ / stdout

2014-10-19 Thread Aaron Myles Landwehr
Aaron Myles Landwehr added the comment: Yeah, it is windows specific. The problem is that if you open conout$ and the descriptor isn't 1, the buffer doesn't flush normally so the console won't display anything unless you manually flush it. Now, why would you want to redirec

[issue22673] Incorrect fileno for CONOUT$ / stdout

2014-10-19 Thread Aaron Myles Landwehr
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$