[Python-Dev] Help to fix this bug http://bugs.python.org/issue15068 (original) (raw)
Serhiy Storchaka storchaka at gmail.com
Tue Jun 19 16:28:28 CEST 2012
- Previous message: [Python-Dev] Help to fix this bug http://bugs.python.org/issue15068
- Next message: [Python-Dev] pep 362 - 5th edition
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 19.06.12 15:13, Antoine Pitrou wrote:
sys.stdin <io.TextIOWrapper name='' mode='r' encoding='UTF-8'> So it's a TextIOWrapper from the io module (which is really the implementation of the io module). You'll find its source in Modules/io. TextIOWrapper objects are defined in Modules/io/textio.c. But as you know, they wrap buffered I/O objects, which are defined in Modules/io/bufferedio.c. In sys.stdin's case, the buffered I/O object wraps a raw FileIO object, defined in Modules/io/fileio.c:
sys.stdin.buffer <io.BufferedReader name=''> sys.stdin.buffer.raw <io.FileIO name='' mode='rb'>
And don't forget about _pyio module.
- Previous message: [Python-Dev] Help to fix this bug http://bugs.python.org/issue15068
- Next message: [Python-Dev] pep 362 - 5th edition
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]