Changes in sasmodels/custom/__init__.py [40a87fa:2a0c7a6] in sasmodels
- 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.