Browse Source

case insensitive glob

main
Hendrik Langer 6 years ago
parent
commit
c29ea8d8a9
  1. 3
      raspberry-environment/display.py

3
raspberry-environment/display.py

@ -235,6 +235,9 @@ if __name__ == '__main__':
list_of_files = glob.glob('/mnt/*.png')
list_of_files.extend(glob.glob('/mnt/*.jpg'))
list_of_files.extend(glob.glob('/mnt/*.bmp'))
list_of_files.extend(glob.glob('/mnt/*.PNG'))
list_of_files.extend(glob.glob('/mnt/*.JPG'))
list_of_files.extend(glob.glob('/mnt/*.BMP'))
if list_of_files:
latest_file = max(list_of_files, key=os.path.getctime)

Loading…
Cancel
Save