#NEWLINE# def getstartpath( pathlist , pathstr ) : #NEWLINE# #INDENT# ' return the path from pathlist that is the first part of pathstr' #NEWLINE# for path in pathlist : #NEWLINE# #INDENT# if os . path . join ( pathstr , '' ) . startswith ( pathlist ) : #NEWLINE# #INDENT# return path #NEWLINE# #UNINDENT# #UNINDENT# return ''