def uri_pathlist(p):
    """Split a path into a list.
    p path
    return list of path elements
    """
    l = []
    for x in p.split('/'):
        if x == '': continue
        l.append(x)
    return l