Lines Matching refs:head
84 # Split a path in head (everything up to the last '/') and tail (the
86 # '/' in the path, head will be empty.
87 # Trailing '/'es are stripped from head unless it is the root.
90 """Split a pathname. Returns tuple "(head, tail)" where "tail" is
93 head, tail = p[:i], p[i:]
94 if head and head != '/'*len(head):
95 head = head.rstrip('/')
96 return head, tail
125 # Return the head (dirname) part of a path, same as split(path)[0].
130 head = p[:i]
131 if head and head != '/'*len(head):
132 head = head.rstrip('/')
133 return head