mirror of https://github.com/patacrep/patacrep.git
Louis
12 years ago
3 changed files with 14 additions and 14 deletions
@ -0,0 +1,13 @@ |
|||
#!/usr/bin/python |
|||
# -*- coding: utf-8 -*- |
|||
# |
|||
|
|||
import fnmatch |
|||
import os |
|||
|
|||
def recursiveFind(root_directory, pattern): |
|||
matches = [] |
|||
for root, dirnames, filenames in os.walk(root_directory): |
|||
for filename in fnmatch.filter(filenames, pattern): |
|||
matches.append(os.path.join(root, filename)) |
|||
return matches |
@ -1,13 +0,0 @@ |
|||
#!/usr/bin/python |
|||
# -*- coding: utf-8 -*- |
|||
# |
|||
|
|||
import fnmatch |
|||
import os |
|||
|
|||
def recursiveFind(root_directory, pattern): |
|||
matches = [] |
|||
for root, dirnames, filenames in os.walk(root_directory): |
|||
for filename in fnmatch.filter(filenames, pattern): |
|||
matches.append(os.path.join(root, filename)) |
|||
return matches |
Loading…
Reference in new issue