Changeset a5da1f2 in sasmodels for sasmodels/__init__.py
- Timestamp:
- May 10, 2016 4:36:09 PM (8 years ago)
- Branches:
- master, core_shell_microgels, costrafo411, magnetic_model, release_v0.94, release_v0.95, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- bd4ed1b
- Parents:
- 848193e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/__init__.py
rdc1e729 ra5da1f2 24 24 """ 25 25 from os.path import join as joinpath 26 from .generate import SIBLING_DIR, DATA_PATH 26 import glob 27 28 from .generate import EXTERNAL_DIR, DATA_PATH 29 27 30 data_files = {} 28 31 def add_patterns(path, patterns): 29 data_files[joinpath( SIBLING_DIR, *path)] \32 data_files[joinpath(EXTERNAL_DIR, *path)] \ 30 33 = [joinpath(DATA_PATH, *(path+[p])) for p in patterns] 31 34 add_patterns([], ['*.c', '*.cl', 'convert.json']) … … 34 37 35 38 # Fish out full paths for all files. 36 import glob37 39 return_list=[] 38 for key, values in data_files.iteritems():40 for path, patterns in data_files.items(): 39 41 files_data=[] 40 for value in values:41 files_data += [file for file in glob.glob(value)]42 return_list.append([ key, files_data])42 for pattern in patterns: 43 files_data.extend(glob.glob(pattern)) 44 return_list.append([path, files_data]) 43 45 return return_list 44 46
Note: See TracChangeset
for help on using the changeset viewer.