On 30 May 2018 at 02:38, Guido van Rossum <gu...@python.org> wrote:

> Honestly, despite the occasional use case(1), I'm not sure that this is a
> battery we need in the stdlib. Nobody seems too excited about writing the
> code, and when the operation is needed, shelling out to the system chown is
> not too onerous. (Ditto for chmod.)
>
> (1) Not even sure that a use case was shown -- it was just shown that the
> operation is not necessarily useless.
>

My main use cases have been in installers and test suites, but those cases
have also been for Linux-specific code where shelling out to "chown -R" and
"chmod -R" was an entirely acceptable alternative.

I think one of the other key points here is that "chown" and "chmod"
inherently don't map at all well to the Windows filesystem access control
model [1], so there's no new portability challenges arising from expecting
the chown and chmod commands to be available.

Cheers,
Nick.

[1] os.chown and shutil.chown don't exist at all there, and os.chmod only
supports setting a file to read-only - there isn't any access to user or
group permissions.

-- 
Nick Coghlan   |   ncogh...@gmail.com   |   Brisbane, Australia
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to