Various¶
A collection of functions that don’t really fit with anything else.
- Various.fn_patternmatch(pattern)¶
Grabs all files in the file system that match the pattern and returns a dictionary with {file: wildcard}. Only works if the wildcard is in the file name and not in a directory name. Files that start with ._ (e.g. temporary or system files) will be skipped. E.g. for a directory BirdCollection/ that contains Bird_Kakapo.txt and Bird_Kea.txt: fn_patternmatch(“BirdCollection/*.txt” = {“BirdCollection/Bird_Kakapo.txt”: “Kakao”, “BirdCollection/Bird_Kea.txt”: “Kea”}
*Various.fn_patternmatch*
{'ExampleData/BirdCollection/Bird_Kea.txt': 'Kea', 'ExampleData/BirdCollection/Bird_Kakapo.txt': 'Kakapo'}