Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

13 lines (9 sloc) 0.318 kb
# Inspired by http://stackoverflow.com/a/2186639
import os
import re
def rglob(treeroot, pattern):
results = []
for base, dirs, files in os.walk(treeroot):
goodfiles = filter(lambda x: re.search(pattern, x), files)
results.extend(os.path.join(base, f) for f in goodfiles)
return results
Jump to Line
Something went wrong with that request. Please try again.