importinspectimportimpdefgetmodule(path):name=inspect.getmodulename(path)returnnamedeffindviews(path):"""input view.py path output links to pages (function name)"""path=imp.load_source("__inspected__",path)all_functions=inspect.getmembers(path,predicate=inspect.isfunction)if(all_functions):all_functions=sorted(all_functions)returnall_functionselse:return('no views found')defcleanlist(item_list,exclude):"""convert inspect tuple to list and apply exclude list"""# convert tuple to listlist_string=[]foriteminitem_list:list_string.append(item[1].__name__)# apply exclusionsclean_list=[]foreinlist_string:ifenotinexclude:clean_list.append(e)item_list=clean_listreturnclean_listdefcleanhomelist(item_list,exclude):passif__name__=='__main__':pass