Debian Codegraph @

planetary_system_stacker/Test_programs/image_directory_content.py

raw symbols SCIP
1 from os import listdir, rename, remove
2 from os.path import splitext, join, dirname
3
4 # The following lists define the allowed file extensions for still images and videos.
5 image_extensions = ['.tif', '.tiff', '.fit', '.fits', '.jpg', '.png']
6
7 dir_name = "D:\SW-Development\Python\PlanetarySystemStacker\Examples\Moon_2011-04-10\South"
8 names = [join(dir_name, name) for name in listdir(dir_name) if splitext(name)[-1].lower() in image_extensions]
9
10 print ("names: " + str(names))
11