[Python-ideas] find-like functionality in pathlib

Thomas Güttler guettliml at thomas-guettler.de
Tue Dec 22 13:08:56 EST 2015


Am 04.12.2015 um 20:00 schrieb Ram Rachum:
> What do you think about implementing functionality similar to the `find` utility in Linux in the Pathlib module? I wanted this today, I had a script to write to archive a bunch of files from a folder, and I decided to try writing it in Python rather than in Bash. But I needed something stronger than `Path.glob` in order to select the files. I wanted a regular expression. (In this particular case, I wanted to get a list of all the files excluding the `.git` folder and all files inside of it.


Me, too. I miss a find like method. I use os.walk() since more than 10 years, but it still feels way too complicated.

I asked about a library on softwarerecs some weeks ago:

http://softwarerecs.stackexchange.com/questions/26296/python-library-for-traversing-directory-tree-like-unix-command-line-tool-find




-- 
http://www.thomas-guettler.de/


More information about the Python-ideas mailing list