add python version of wildcard-matching