def get_python_module_names(file_list, file_suffix='.py'):
 module_names = [m[:m.rfind(file_suffix)] for m in file_list if m.endswith(file_suffix)]
 return module_names

def get_python_module_names ( file_list , file_suffix = '.py' ) : module_names = [ m [ : m . rfind ( file_suffix ) ] for m in file_list if m . endswith ( file_suffix ) ] return module_names
return a list of module names from a filename list .