On 17/01/2013 13:02, Victor Stinner wrote:
2013/1/13 Jeff Allen<ja.....@farowl.co.uk>:
I think io, meaning _io and _pyio really, would be amongst the impacted
modules, and should perhaps be in the examples. (I am currently working on
the Jython implementation of the _io module.) It seems to me that io.open,
and probably all the constructors, such as _io.FileIO, would need the extra
information as a mode or a boolean argument like closefd. This may be a
factor in your choice above.
open() is listed in the PEP: open is io.open. I plan to add cloexec
parameter to open() and FileIO constructor (and so io.open and
_pyio.open). Examples:
rawfile = io.FileIO("test.txt", "r", cloexec=True)
textfile = open("text.txt", "r", cloexec=True)
Ok it fell under "too obvious to mention". And my ignorance of v3.x,
sorry. (We're still working on 2.7 in Jython, where open is from
__builtin__.) Thanks for the reply.
Jeff Allen
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com