if p.returncode != 0 or not os.path.isfile(tmptxt):
return [
False,
_('Failed to perform recognition'),
'tesseract ' + _('returned') + ':\n' + out[1] + '\n' + _('This probabily is a bug in tesseract, retry using an image at a different resolution or by varying the selected region.')]
outfile = None(tmptxt, 'r')
self.outtext += outfile.read()
os.close(tmptxtdesc)
outfile.close()
os.remove(tmptxt)
return [
True]
def __recognize_done(self, result):
''' Finalizes the recognition process, initiated by see self.recognize. '''