#NEWLINE# def __upsearch( file_name , dir_name ) : #NEWLINE# #INDENT# 'Search upward for file' #NEWLINE# if isfile ( ( '%s/%s' % ( dir_name , file_name ) ) ) : #NEWLINE# #INDENT# return dir_name #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# new_dir = abspath ( join ( new_dir , pardir ) ) #NEWLINE# if ( dir_name == new_dir ) : #NEWLINE# #INDENT# return None #NEWLINE# #UNINDENT# return __upsearch ( file_name , new_dir )