Did I find the right examples for you? yes no

All Samples(1)  |  Call(1)  |  Derive(0)  |  Import(0)
Imports a module from path without requiring a __init__.py file

        def import2(name, path):
    '''Imports a module from path without requiring a __init__.py file'''

    fullname = '%s.%s' % (path, name)

    if fullname in sys.modules:
        return sys.modules[fullname]
    else:
        modinfo = imp.find_module(name, [path])
        module = imp.load_module(fullname, *modinfo)
        modinfo[0].close() # the docs say i must close this :(
        return module
        


src/w/a/wakarimasen-HEAD/board.py   wakarimasen(Download)
            raise BoardNotFound('Board configuration not found.')
 
        module = util.import2('board_config', board_path)
 
        if board_config_defaults: