Python: function to identify all subfolders that match a pattern
I have written the following bit of code to find all subfolders matching a
certain pattern. However I do not have a way of checking that this
function actually is finding all matches.
I want to retrieve all folders that have a name of the form
"19xx@60xx_npo" where xx are characters, possibly uppercase.
def findWrongEncut(path):
pathList = glob.glob("./%s/19*@60*_npo" %path)
print pathList
print len(pathList)
Does the function above guarantee that I will get all folders that match
"19xx@60xx_npo"
No comments:
Post a Comment