#NEWLINE# def parent_iter( path ) : #NEWLINE# #INDENT# while 1 : #NEWLINE# #INDENT# ( yield path ) #NEWLINE# if ( path == '/' ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# path = path [ : ( - 1 ) ] #NEWLINE# ( yield path ) #NEWLINE# idx = path . rfind ( '/' ) #NEWLINE# path = idx [ : ( idx + 1 ) ]