import os

def name_with_path(dirs, file):
    """ name_with_path(dirs, file) --> occurence_list
  It searches for the file in 'dirs' directory list.
  It gives back all the 0 or more occurences in a list."""
    
    list = []
    for path in dirs:
        whole_name = os.path.join(path, file)
        if os.path.isfile(whole_name):
            list.append(whole_name)
    return list

konyvtarak = ['','../zh', 'base']
file_neve = 'vizsga.tex'

print name_with_path.__doc__
print name_with_path(konyvtarak, file_neve)
    
