I need a excluded list feature that, given a specific filename or directory name, it can tell me if they should be excluded (just like .gitignore). And it needs to support both specific names such as /home/abc/test or wildcard cases such as /home/*/test/ (All test directory of ALL directories under /home).
I thought it's quiet a standard feature, is there any existing package can do that? (I checked the glob module but it only expands the * to one directory level.)