def qr(text):
qr = pyqrcode.create(text, encoding='utf-8')
#print(qr.terminal(quiet_zone=1))
qr.png('img/qr.png', scale=3, quiet_zone=1)
im =
Image.open('img/qr.png')
width, height = im.size
bg =
Image.new('RGB', (width + 150,height), color=('#FFF'))
drawtext = ImageDraw.Draw(bg)
font = ImageFont.truetype("/usr/share/fonts/truetype/ubuntu/Ubuntu-B.ttf", 18)
drawtext.text((width,height / 3), text, fill=('#000'), font=font)
bg.paste(im, box=(0,0))
bg.save("img1.png")
qr('Code: 34534\nВаш код: 4444')