diff --git a/scripts/exports.py b/scripts/exports.py index 3a478d9..ae2d5f7 100644 --- a/scripts/exports.py +++ b/scripts/exports.py @@ -83,7 +83,7 @@ def make_parts(target, part_type, parts = None): # # Find all the scad files # - lib_dirs = [path + '/' + lib + '/printed' for path in os.environ['OPENSCADPATH'].split(os.pathsep) for lib in os.listdir(path)] + lib_dirs = [path + '/' + lib + '/printed' for path in os.environ['OPENSCADPATH'].split(os.pathsep) for lib in sorted(os.listdir(path))] module_suffix = '_dxf' if part_type == 'svg' else '_' + part_type for dir in [source_dir, source_dir + '/printed'] + lib_dirs: if os.path.isdir(dir): diff --git a/scripts/views.py b/scripts/views.py index d7139b9..a2eb7a1 100755 --- a/scripts/views.py +++ b/scripts/views.py @@ -124,7 +124,7 @@ def views(target, do_assemblies = None): # Find all the scad files # main_blurb = None - lib_dirs = [path + '/' + lib + '/printed' for path in os.environ['OPENSCADPATH'].split(os.pathsep) for lib in os.listdir(path)] + lib_dirs = [path + '/' + lib + '/printed' for path in os.environ['OPENSCADPATH'].split(os.pathsep) for lib in sorted(os.listdir(path))] for dir in [source_dir, source_dir + '/printed'] + lib_dirs: if os.path.isdir(dir): for filename in os.listdir(dir):