Glob in python which supports the ** wildcard

Martin v. Loewis martin at v.loewis.de
Mon Nov 22 19:42:50 EST 2010


Am 22.11.2010 22:43, schrieb Martin Lundberg:
> Hi,
> 
> I want to be able to let the user enter paths like this:
> 
> apps/name/**/*.js
> 
> and then find all the matching files in apps/name and all its
> subdirectories. However I found out that Python's glob function
> doesn't support the recursive ** wildcard. Is there any 3rd party glob
> function which do support **?

mercurial.match supports apps/name/**.js (IIUC).
mglob supports rec:*.js.

Regards,
Martin



More information about the Python-list mailing list