list some pattern file under some directory include the sub directory

it can be used in python2/3