Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/custom/__init__.py

    r40a87fa r2a0c7a6  
    1717    def load_module_from_path(fullname, path): 
    1818        """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)) 
    2020        module = module_from_spec(spec) 
    2121        spec.loader.exec_module(module) 
     
    2626    def load_module_from_path(fullname, path): 
    2727        """load module from *path* as *fullname*""" 
    28         module = imp.load_source(fullname, path) 
     28        module = imp.load_source(fullname, os.path.expanduser(path)) 
    2929        #os.unlink(path+"c")  # remove the automatic pyc file 
    3030        return module 
     
    3535    name = basename(splitext(path)[0]) 
    3636    # 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)) 
    3839    return kernel_module 
Note: See TracChangeset for help on using the changeset viewer.