Re: [Python-Dev] Extending os.chown() to accept user/group names

2011-06-01 Thread Łukasz Langa
Wiadomość napisana przez Martin v. Löwis w dniu 2011-06-01, o godz. 08:48: >> Le mercredi 25 mai 2011 à 18:46 +0200, Charles-François Natali a écrit : >>> While we're at it, adding a "recursive" argument to this shutil.chown >>> could also be useful. >> >> I don't like the idea of a recursive fl

Re: [Python-Dev] Extending os.chown() to accept user/group names

2011-05-31 Thread Martin v. Löwis
> Le mercredi 25 mai 2011 à 18:46 +0200, Charles-François Natali a écrit : >> While we're at it, adding a "recursive" argument to this shutil.chown >> could also be useful. > > I don't like the idea of a recursive flag. I think shutil.chown should aim to mimic chown(1). At least GNU chown has a -

Re: [Python-Dev] Extending os.chown() to accept user/group names

2011-05-26 Thread Sandro Tosi
On Wed, May 25, 2011 at 15:58, Antoine Pitrou wrote: > On Wed, 25 May 2011 09:41:46 -0400 > Barry Warsaw wrote: >> I think it would be a nice feature, and I can see the conflict.  OT1H you >> want >> to keep os.chown() a thin wrapper, but OTOH you'd rather not have to add a >> new, arguably more

Re: [Python-Dev] Extending os.chown() to accept user/group names

2011-05-25 Thread Petri Lehtinen
Nick Coghlan wrote: > 2011/5/26 Charles-François Natali : > > Then, I wonder why shutil.copytree and shutil.rmtree are provided. > > Recursive rm/copy/chown/chmod are extremely useful in system > > administration scripts. Furthermore, it's not as simple as it seems > > because of symlinks, see for

Re: [Python-Dev] Extending os.chown() to accept user/group names

2011-05-25 Thread Nick Coghlan
2011/5/26 Charles-François Natali : > Then, I wonder why shutil.copytree and shutil.rmtree are provided. > Recursive rm/copy/chown/chmod are extremely useful in system > administration scripts. Furthermore, it's not as simple as it seems > because of symlinks, see for example http://bugs.python.org

Re: [Python-Dev] Extending os.chown() to accept user/group names

2011-05-25 Thread Tim Delaney
2011/5/26 Victor Stinner > Le mercredi 25 mai 2011 à 18:46 +0200, Charles-François Natali a écrit : > > While we're at it, adding a "recursive" argument to this shutil.chown > > could also be useful. > > I don't like the idea of a recursive flag. I would prefer a "map-like" > function to "apply"

Re: [Python-Dev] Extending os.chown() to accept user/group names

2011-05-25 Thread Charles-François Natali
>> While we're at it, adding a "recursive" argument to this shutil.chown >> could also be useful. > > I don't like the idea of a recursive flag. I would prefer a "map-like" > function to "apply" a function on all files of a directory. Something > like shutil.apply_recursive(shutil.chown)... > I wa

Re: [Python-Dev] Extending os.chown() to accept user/group names

2011-05-25 Thread Petri Lehtinen
Victor Stinner wrote: > Le mercredi 25 mai 2011 à 18:46 +0200, Charles-François Natali a écrit : > > While we're at it, adding a "recursive" argument to this shutil.chown > > could also be useful. > > I don't like the idea of a recursive flag. I would prefer a "map-like" > function to "apply" a fu

Re: [Python-Dev] Extending os.chown() to accept user/group names

2011-05-25 Thread Eric Smith
On 5/25/2011 1:17 PM, Victor Stinner wrote: > Le mercredi 25 mai 2011 à 18:46 +0200, Charles-François Natali a écrit : >> While we're at it, adding a "recursive" argument to this shutil.chown >> could also be useful. > > I don't like the idea of a recursive flag. I would prefer a "map-like" > func

Re: [Python-Dev] Extending os.chown() to accept user/group names

2011-05-25 Thread Victor Stinner
Le mercredi 25 mai 2011 à 18:46 +0200, Charles-François Natali a écrit : > While we're at it, adding a "recursive" argument to this shutil.chown > could also be useful. I don't like the idea of a recursive flag. I would prefer a "map-like" function to "apply" a function on all files of a directory

Re: [Python-Dev] Extending os.chown() to accept user/group names

2011-05-25 Thread Charles-François Natali
While we're at it, adding a "recursive" argument to this shutil.chown could also be useful. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-de

Re: [Python-Dev] Extending os.chown() to accept user/group names

2011-05-25 Thread Barry Warsaw
On May 25, 2011, at 04:15 PM, Dirkjan Ochtman wrote: >Right. Please add a mention of shutil.chown() to the os.chown() docs, though. Brilliant! -Barry signature.asc Description: PGP signature ___ Python-Dev mailing list Python-Dev@python.org http://ma

Re: [Python-Dev] Extending os.chown() to accept user/group names

2011-05-25 Thread Dirkjan Ochtman
On Wed, May 25, 2011 at 15:41, Barry Warsaw wrote: > I think it would be a nice feature, and I can see the conflict.  OT1H you want > to keep os.chown() a thin wrapper, but OTOH you'd rather not have to add a > new, arguably more difficult to discover, function.  Given those two choices, > I still

Re: [Python-Dev] Extending os.chown() to accept user/group names

2011-05-25 Thread Antoine Pitrou
On Wed, 25 May 2011 09:41:46 -0400 Barry Warsaw wrote: > On May 25, 2011, at 10:24 AM, Sandro Tosi wrote: > > >before opening an issue to track the request, I'd like to ask advice > >here about this: extend os.chown() to accept even user/group names > >instead of just uid and gid. > > > >On a Un

Re: [Python-Dev] Extending os.chown() to accept user/group names

2011-05-25 Thread Barry Warsaw
On May 25, 2011, at 10:24 AM, Sandro Tosi wrote: >before opening an issue to track the request, I'd like to ask advice >here about this: extend os.chown() to accept even user/group names >instead of just uid and gid. > >On a Unix system, you can call chown command passing either id or >names, so i

[Python-Dev] Extending os.chown() to accept user/group names

2011-05-25 Thread Sandro Tosi
Hi all, before opening an issue to track the request, I'd like to ask advice here about this: extend os.chown() to accept even user/group names instead of just uid and gid. On a Unix system, you can call chown command passing either id or names, so it seems (to me at least) natural to expect os.ch