how to generate a QR co de using python with gui
write this program in python
you have already created then send me program
Answers
Creating QR cōde - Python
So here in this question we are going to create a QR cōde using Python with GUI. In this program it required to takes texas input and creates a corresponding QR cōde png in the same directory.
Well, before start programming let's first know about that what is Python.
Python is a powerful high-level, object-oriented programming language created by Guido van Rossum. It has simple easy-to-use syntax, making it the perfect language for someone trying to learn computer programming for the first time.
Modules required
To run the below program first we need to instāll two modules, pyqrcōde and pypng by running below command in our shell.
The Program
import pyqrcōde
from tkinter import *
import os
def create():
⠀ s=entvar.get()
⠀ url=pyqrcōde.create(s)
⠀ url.png("myqr.png",scale=8)
⠀ os.system("myqr.png")
root=Tk()
Label(root,text="Enter QR Cōde Text").grid(row=0,padx=20)
entvar=StringVar()
Entry(root,textvariable=entvar).grid(row=1,padx=10,pady=10)
Button(root,text="Create",command=create).grid(row=2,padx=20)
mainloop()
Do not copy-paste the exact cōde and run it, there are some white-space and no-space characters that will need to be removed before use, I've entered them for the sake of showing indentations in the cōde
Creating QR cōde - Python
So here in this question we are going to create a QR cōde using Python with GUI. In this program it required to takes texas input and creates a corresponding QR cōde png in the same directory.
Well, before start programming let's first know about that what is Python.
Python is a powerful high-level, object-oriented programming language created by Guido van Rossum. It has simple easy-to-use syntax, making it the perfect language for someone trying to learn computer programming for the first time.