python glob files code example
Example 1: python glob
import glob
print 'Named explicitly:'
for name in glob.glob('dir/subdir/*'):
print '\t', name
print 'Named with wildcard:'
for name in glob.glob('dir/*/*'):
print '\t', name
Example 2: python glob subdirectories
import glob
subdirectories = glob.glob("./*/")
Example 3: glob.glob python
glob.glob("/home/ismail/*.txt")