def dirpath_to_list(p):
if   p is None: p = []<EOL>elif pimms.is_str(p): p = p.split('<STR_LIT::>')<EOL>if len(p) > <NUM_LIT:0> and not pimms.is_vector(p, str):<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT>return [pp for pp in p if os.path.isdir(pp)]<EOL>
dirpath_to_list(path) yields a list of directories contained in the given path specification.

A path may be either a single directory name (==> [path]), a :-separated list of directories
(==> path.split(':')), a list of directory names (==> path), or None (==> []). Note that the
return value filters out parts of the path that are not directories.