Skip to content

Instantly share code, notes, and snippets.

@yushulx
Created November 2, 2020 08:44
Show Gist options
  • Save yushulx/daf254506b99e79c522ce13a3d13a33e to your computer and use it in GitHub Desktop.
Save yushulx/daf254506b99e79c522ce13a3d13a33e to your computer and use it in GitHub Desktop.
try:
text_results = reader.decode_file(self.filePath)
if text_results != None:
for text_result in text_results:
print("Barcode Format :")
print(text_result.barcode_format_string)
self.prevLabelText = text_result.barcode_format_string
print("Barcode Text :")
print(text_result.barcode_text)
print("Localization Points : ")
print(text_result.localization_result.localization_points)
print("-------------")
except BarcodeReaderError as bre:
print(bre)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment