def perform_cleanup(scratch_image_name, scratch_text_name_root):
 for name in (scratch_image_name, (scratch_text_name_root + '.txt'), 'tesseract.log'):
  try:
   os.remove(name)
  except OSError:
   pass

def perform_cleanup ( scratch_image_name , scratch_text_name_root ) : for name in ( scratch_image_name , ( scratch_text_name_root + '.txt' ) , 'tesseract.log' ) : try : os . remove ( name ) except OSError : pass
clean up temporary files from disk .