[Python-ideas] find-like functionality in pathlib

Laura Creighton lac at openend.se
Fri Dec 4 14:04:45 EST 2015


In a message of Fri, 04 Dec 2015 21:00:47 +0200, Ram Rachum writes:
>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.

fnmatch https://docs.python.org/3.6/library/fnmatch.html
wasn't sufficient for your needs?

Laura


More information about the Python-ideas mailing list