We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 55493f2 commit d39200cCopy full SHA for d39200c
tools/utils.py
@@ -26,7 +26,7 @@
26
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
28
29
-import glob
+import os
30
import platform
31
import re
32
import sys
@@ -111,7 +111,11 @@ def IsWindows():
111
112
113
def SearchFiles(dir, ext):
114
- list = glob.glob(dir+ '/**/*.' + ext, recursive=True)
+ matching_files = []
115
+ for path, dirs, files in os.walk(dir):
116
+ for file in files:
117
+ if file.endswith('.' + ext):
118
+ matching_files.append(path + '/' + file)
119
if sys.platform == 'win32':
- list = [ x.replace('\\', '/')for x in list]
- return list
120
+ matching_files = [x.replace('\\', '/') for x in matching_files]
121
+ return matching_files
0 commit comments