Skip to content

Commit f137e80

Browse files
Merge branch 'geekcomputers:master' into master
2 parents 5761e79 + ae8681c commit f137e80

File tree

1 file changed

+6
-14
lines changed

1 file changed

+6
-14
lines changed

QR_code_generator/qrcode.py

+6-14
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,9 @@
1-
import pyqrcode
2-
import png
1+
import pyqrcode, png
32
from pyqrcode import QRCode
43

5-
# Text which is to be converted to QR code
6-
print("Enter text to convert")
7-
s = input(": ")
8-
# Name of QR code png file
9-
print("Enter image name to save")
10-
n = input(": ")
11-
# Adding extension as .pnf
12-
d = n + ".png"
13-
# Creating QR code
14-
url = pyqrcode.create(s)
15-
# Saving QR code as a png file
4+
# Creating QR code after given text "input"
5+
url = pyqrcode.create(input("Enter text to convert: "))
6+
# Saving QR code as a png file
167
url.show()
17-
url.png(d, scale=6)
8+
# Name of QR code png file "input"
9+
url.png(input("Enter image name to save: ") + ".png", scale=6)

0 commit comments

Comments
 (0)