From c29ea8d8a98ac7f2cc0682ce937e793d3169d707 Mon Sep 17 00:00:00 2001 From: Hendrik Langer Date: Tue, 24 Jul 2018 13:04:27 +0200 Subject: [PATCH] case insensitive glob --- raspberry-environment/display.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/raspberry-environment/display.py b/raspberry-environment/display.py index d53d8e0..8932704 100644 --- a/raspberry-environment/display.py +++ b/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)