Last active
January 27, 2020 17:15
-
-
Save souvikhaldar/2664c020fb14ecac15c92bed35bca2ef to your computer and use it in GitHub Desktop.
How to generate QR code of any text data in python3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Importing the module pyqrcode | |
import pyqrcode | |
# data for the QR code | |
s = input("Enter the data to be put in the QR code: ") | |
# Generate QR code by the help of create function | |
url = pyqrcode.create(s) | |
# name of the geneated file | |
name = input("Enter name for the generated image file: ") | |
filename = name + ".svg" | |
url.svg(filename, scale = 8) | |
print("File saved as",filename) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Need to install module
pyqrcode
first usingpip
. i.epip3 install pyqrcode