The UNIX find tool has many, many options. For the general case it's probably easier to use os.walk(). But there are probably some common uses that deserve better direct support in e.g. the glob module. Would just a way to recursively search for matches using e.g. "**.txt" be sufficient? If not, can you specify what else you'd like? (Just " find-like" is too vague.)

--Guido (mobile)

On Dec 22, 2015 11:14 AM, "Thomas G├╝ttler" <> wrote:
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:

Python-ideas mailing list
Code of Conduct: