| Issue 3: | Made it throw CodeOverflowException instead of regular Exception | |
| Back to list |
CodeOverflowException can be caught and typeNumber increased progressively until the data fits in the code. Example:
from PyQRNative import *
complete = False
qr_type = 1
while not complete:
qr = QRCode(qr_type, QRErrorCorrectLevel.L)
qr.addData("http://example.com/")
try:
qr.make()
except CodeOverflowException:
qr_type += 1
else:
complete = True
Mar 1, 2011
#1
pawel.de...@gmail.com
|