[issue1625576] add ability to specify name to os.fdopen

Serhiy Storchaka report at bugs.python.org
Tue Feb 10 12:58:03 CET 2015


Serhiy Storchaka added the comment:

And the name attribute of FileIO object is writable. So you can change it after calling fdopen.

>>> import os
>>> f = os.fdopen(2, "w")
>>> f
<_io.TextIOWrapper name=2 mode='w' encoding='UTF-8'>
>>> f.buffer.raw.name = 'useful name'
>>> f
<_io.TextIOWrapper name='useful name' mode='w' encoding='UTF-8'>

----------
nosy: +serhiy.storchaka
resolution:  -> rejected
status: languishing -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue1625576>
_______________________________________


More information about the Python-bugs-list mailing list