mode for file created by open

Devin Jeanpierre jeanpierreda at gmail.com
Sat Jun 9 10:08:15 EDT 2012


On Sat, Jun 9, 2012 at 7:42 AM, Neal Becker <ndbecker2 at gmail.com> wrote:
> Doesn't anyone else think it would be a good addition to open to specify a file
> creation mode?  Like posix open?  Avoid all these nasty workarounds?

I do, although I'm hesitant, because this only applies when mode ==
'w', and open has a large and growing list of parameters.

A chmod method would also work. Although you can use
os.fchmod(f.fileno(), ...) instead (another workaround? fun. TIMTOWTDI
I guess).

-- Devin



More information about the Python-list mailing list