Hi all
I’m trying to make python code to add QRcode to drawings.
I have some error at this moment.
can anybody help me.
btw I added some library to lib folder. seems some of them works but some not.
I have this PIL folder with is image.py is inside it but still python can not find it.
import rhinoscriptsyntax as rs
import qrcode
input_data = “test”
qr = qrcode.QRCode(
version=1,
box_size=10,
border=5)
qr.add_data(input_data)
qr.make(fit=True)
img = qr.make_image(fill=‘black’, back_color=‘white’)
img.save(‘D:\Downloads\barcode0000.jpg’)
path = “D:\Downloads\barcode0000.jpg”
cmd = "-Picture " + path
rs.Command(cmd, True)
7 posts - 4 participants