def import_libs(dir):
    """ Imports the libs, returns a list of the libraries. 
    Pass in dir to scan """
    
    library_list = [] 
    
    for f in os.listdir(os.path.abspath(dir)):       
        module_name, ext = os.path.splitext(f) # Handles no-extension files, etc.
        if ext == 'py': # Important, ignore .pyc/other files.
            print 'imported module: %s' % (module_name)
            module = __import__(module_name)
            library_list.append(module)
 
    return library_list
 Imports the libs, returns a list of the libraries. 
    Pass in dir to scan 
recipes/Python/436873_Import_ModulesDiscover_methods_directory/recipe-436873.py