#NEWLINE# def process_dir( cpdir , temp , count , seed = None , ident = 'output' , verbose = False ) : #NEWLINE# #INDENT# if cpdir : #NEWLINE# #INDENT# print ( ( 'processing ' + cpdir ) ) #NEWLINE# #UNINDENT# best_cp = find_best_cp ( cpdir ) #NEWLINE# if ( not ( best_cp is None ) ) : #NEWLINE# #INDENT# sample ( best_cp , temp , count , seed = seed , ident = ident ) #NEWLINE# #UNINDENT# for path in os . listdir ( cpdir ) : #NEWLINE# #INDENT# fullpath = os . path . join ( cpdir , path ) #NEWLINE# if os . path . isdir ( fullpath ) : #NEWLINE# #INDENT# process_dir ( fullpath , temp , count , seed = seed , ident = ident , verbose = verbose )