This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author paul.j3
Recipients anacrolix, bethard, josh.r, moritz, paul.j3, pitrou
Date 2014-04-03.00:11:00
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
There are a couple of complications to using 'fileno'.

We probably don't want to close 'sys.stdin' or 'sys.stdout' (not even if they are redirected to other files?).  That means using:

    open(sys.stdin.fileno(), ..., closefd=False)

'closefd', on the other hand, has to be True for string file specifications.

But in '', 'sys.stdout' is redirected to an 'io.StringIO'.  This has many of the same features as an open file, but 'fileno' is not implemented.  So the TypeFile probably needs to make an exception for this case.  I don't how this will play with a 'BytesIO' for 'wb' cases.
Date User Action Args
2014-04-03 00:11:01paul.j3setrecipients: + paul.j3, pitrou, bethard, anacrolix, moritz, josh.r
2014-04-03 00:11:01paul.j3setmessageid: <>
2014-04-03 00:11:01paul.j3linkissue14156 messages
2014-04-03 00:11:00paul.j3create