Read one-dimensional barcodes and QR codes from Python 2 and 3 using the zbar library.