Script fails to run.
def find_src(dir_list):
# list number from file extension
di = {'.h': 0, '.c': 1, '.cc': 2, '.cpp': 2, '.asm': 3, '.as': 3}
list = [[], [], [], []]
for d in dir_list:
for f in scandir(join(mpir_root_dir, d)):
if
f.name == '.svn': #**** changed to
f.name (from f)
continue # ignore SVN directories
if not f.is_dir(): #**** changed to f.is_dir() (from isdir(f))
n, x = splitext(
f.name) # split into name + extension #**** changed to
f.name (from f)
if x in di and not n in exclude_file_list:
list[di[x]] += [(n, x, d)] # if of the right type and is
for x in list: # not in the exclude list
x.sort(key=itemgetter(2, 0, 1)) # add it to appropriate list
return list