#The glob module provides a function for making file lists from directory wildcard #searches: import glob print glob.glob('*.py')