diff --git a/docs/tutorial/insert_example_code.py b/docs/tutorial/insert_example_code.py index bba1193ab9cf273d2ce204e210c83399bf63e924..e515d55ec5489164cabe2c8a18c53747839f394b 100755 --- a/docs/tutorial/insert_example_code.py +++ b/docs/tutorial/insert_example_code.py @@ -62,8 +62,8 @@ def insert_example_code(examples_base_dir, input_xml_files, output_xml_file): # List all the source files in the examples directory. source_directory = os.path.join(examples_base_dir, source_include_match.group(1)) - for source_filename in glob.glob(os.path.join(source_directory, '*.h')) + \ - glob.glob(os.path.join(source_directory, '*.cc')): + for source_filename in sorted(glob.glob(os.path.join(source_directory, '*.h'))) + \ + sorted(glob.glob(os.path.join(source_directory, '*.cc'))): source_basename = os.path.basename(source_filename) process_source_file(source_directory, source_basename, outfile, True)