list profiles in a given root directory
(path)
| 95 | |
| 96 | |
| 97 | def list_profiles_in(path): |
| 98 | """list profiles in a given root directory""" |
| 99 | profiles = [] |
| 100 | |
| 101 | # for python 3.6+ rewrite to: with os.scandir(path) as dirlist: |
| 102 | files = os.scandir(path) |
| 103 | for f in files: |
| 104 | if f.is_dir() and f.name.startswith('profile_'): |
| 105 | profiles.append(f.name.split('_', 1)[-1]) |
| 106 | return profiles |
| 107 | |
| 108 | |
| 109 | def list_bundled_profiles(): |
no outgoing calls
searching dependent graphs…