Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
'txt',
lang=None,
config=config)
if sys.version_info.major == 3:
f = open(output_file_name, encoding='utf-8')
else:
f = open(output_file_name)
try:
return f.read().strip()
finally:
f.close()
finally:
pytesseract.cleanup(input_file_name)
pytesseract.cleanup(output_file_name)
output_file_name_base,
'txt',
lang=None,
config=config)
if sys.version_info.major == 3:
f = open(output_file_name, encoding='utf-8')
else:
f = open(output_file_name)
try:
return f.read().strip()
finally:
f.close()
finally:
pytesseract.cleanup(input_file_name)
pytesseract.cleanup(output_file_name)