#NEWLINE# def get_parent( fullpath ) : #NEWLINE# #INDENT# '\n    Parse the string and return a path corresponding to the parent.\n    Assumes normalized fullpath string.\n    ' #NEWLINE# parent = '/' . join ( fullpath . split ( '/' ) [ : ( - 1 ) ] ) #NEWLINE# if ( fullpath == '' ) : #NEWLINE# #INDENT# parent = '/' #NEWLINE# #UNINDENT# return parent