A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2011-May/111664.html below:

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

[Python-Dev] Extending os.chown() to accept user/group namesEric Smith eric at trueblade.com
Wed May 25 19:37:26 CEST 2011
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"
> function to "apply" a function on all files of a directory. Something
> like shutil.apply_recursive(shutil.chown)...
> 
> ... maybe with options to choose between deep-first search and
> breadth-first search, filter (filenames, file size, files only,
> directories only, other attributes?), directory before files (may be
> need for chmod(0o000)), etc.

You can do all of this with an appropriate application of os.walk().

Eric.
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4