Python parser and barcode  scanner