Home | History | Annotate | Download | only in Lib

Lines Matching refs:head

77 # Split a path in head (everything up to the last '/') and tail (the
79 # '/' in the path, head will be empty.
80 # Trailing '/'es are stripped from head unless it is the root.
83 """Split a pathname. Returns tuple "(head, tail)" where "tail" is
86 head, tail = p[:i], p[i:]
87 if head and head != '/'*len(head):
88 head = head.rstrip('/')
89 return head, tail
118 # Return the head (dirname) part of a path, same as split(path)[0].
123 head = p[:i]
124 if head and head != '/'*len(head):
125 head = head.rstrip('/')
126 return head