globbing multiple wildcards

Leif K-Brooks eurleif at ecritters.biz
Sat May 7 11:20:53 EDT 2005


utabintarbo at gmail.com wrote:
> I have a path spec similar to '/home/*/.mozilla/*/*/cache*/*' (this
> will probably look familiar to *nix users) with multiple wildcards. I
> am finding it difficult gathering ALL file pathnames which match this
> spec. Can anyone shed some light on this for a python noob?

import glob
glob.glob('/home/*/.mozilla/*/*/cache*/*')



More information about the Python-list mailing list