Showing the changes to python (1 of 1 file). Show all
Unified · Split
| @@ -11,3 +11,10 @@ def list_all_sounds(rel_dir): · 10 unmodified lines | ||
| 11 | 11 | import os.path, glob |
| 12 | 12 | datadir = os.path.join(os.path.dirname(__file__), rel_dir) |
| 13 | 13 | return glob.glob(os.path.join(datadir,'*.*')) |
| 14 | + | |
| 15 | +def array_from_yaml_file(filename): | |
| 16 | + import yaml | |
| 17 | + f = open(filename) | |
| 18 | + yaml_data = yaml.safe_load(f) | |
| 19 | + f.close() | |
| 20 | + return yaml_data | |