Changeset 2a0c7a6 in sasmodels
- Timestamp:
- Sep 12, 2016 1:18:36 AM (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:
- 4cc161e
- Parents:
- 424fe00
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/custom/__init__.py
r40a87fa r2a0c7a6 17 17 def load_module_from_path(fullname, path): 18 18 """load module from *path* as *fullname*""" 19 spec = spec_from_file_location(fullname, path)19 spec = spec_from_file_location(fullname, os.path.expanduser(path)) 20 20 module = module_from_spec(spec) 21 21 spec.loader.exec_module(module) … … 26 26 def load_module_from_path(fullname, path): 27 27 """load module from *path* as *fullname*""" 28 module = imp.load_source(fullname, path)28 module = imp.load_source(fullname, os.path.expanduser(path)) 29 29 #os.unlink(path+"c") # remove the automatic pyc file 30 30 return module … … 35 35 name = basename(splitext(path)[0]) 36 36 # Placing the model in the 'sasmodels.custom' name space. 37 kernel_module = load_module_from_path('sasmodels.custom.'+name, path) 37 kernel_module = load_module_from_path('sasmodels.custom.'+name, 38 os.path.expanduser(path)) 38 39 return kernel_module
Note: See TracChangeset
for help on using the changeset viewer.