def dir_list(load):
    '''
    Return a list of all directories in a specified environment
    '''
    ret = set()
    files = file_list(load)
    for f in files:
        dirname = f
        while dirname:
            dirname = os.path.dirname(dirname)
            if dirname:
                ret.add(dirname)
    return list(ret)
Return a list of all directories in a specified environment