Glob in python which supports the ** wildcard

Stefan Sonnenberg-Carstens stefan.sonnenberg at pythonmeister.com
Mon Nov 22 17:05:16 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 **?
>
> Regards,
>
> Martin Lundberg
>
os.walk() or os.path.walk() can be used.
You need to traverse the file system.
AFAIK there is no support for this.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: stefan_sonnenberg.vcf
Type: text/x-vcard
Size: 223 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20101122/551eb9d4/attachment-0001.vcf>


More information about the Python-list mailing list