python script to compile input filenames