diff --git a/python/examples_menu.py b/python/examples_menu.py
index 9eef472f8c53e305fd5b78aef616cf06b8d46a40..e329bbef944854f0c622bfe3b5d8f29bdeb685f6 100644
--- a/python/examples_menu.py
+++ b/python/examples_menu.py
@@ -34,7 +34,8 @@ def fill_examples_menu(examples_menu, path, action_function):
 
         # add examples nestable under posix_dir_path
         dir_menu = examples_menu.addMenu(posix_dir_path.name)
-        posix_paths = sorted(posix_dir_path.rglob("*.mp"))
+        posix_paths = sorted(posix_dir_path.rglob("*.mp"),
+                             key=lambda x: x.name.casefold())
         _add_paths(posix_dir_path, posix_paths, dir_menu, action_function)
 
     # add top-level examples
diff --git a/python/search_mp_files_dialog_wrapper.py b/python/search_mp_files_dialog_wrapper.py
index e6ffd1cb9b7624848cf2d4d154ab57b6ecd1b15f..83e70f01b71fc59a8aca5d696467663366131511 100644
--- a/python/search_mp_files_dialog_wrapper.py
+++ b/python/search_mp_files_dialog_wrapper.py
@@ -187,7 +187,7 @@ class FileMetadataTableView(QTableView):
 
 def _append_library(library_path, file_metadata_list):
     p = Path(library_path)
-    posix_paths = sorted(p.rglob("*.mp"))
+    posix_paths = sorted(p.rglob("*.mp"), key=lambda x: x.name.casefold())
     if verbose():
         print("Reading library %s count %d"%(library_path, len(posix_paths)))
     for posix_path in posix_paths: