QR코드 자동으로 생성하는 프로그램 만들기
import qrcode
qr_data = 'www.naver.com'
qr_img = qrcode.make(qr_data) #qrcode,make 로 이미지를 만들어 qr_img 변수에 바인딩 한다.
save_path = '4. QR코드 생성기\\' + qr_data + '.png'
qr_img.save(save_path)
import qrcode
file_path = r'4. QR코드 생성기\qr코드모음.txt'
with open(file_path, 'rt', encoding='UTF8') as f :
read_lines = f.readlines()
for line in read_lines:
line = line.strip()
print(line)
import qrcode
file_path = r'4. QR코드 생성기\qr코드모음.txt'
with open(file_path, 'rt', encoding='UTF8') as f :
read_lines = f.readlines()
for line in read_lines:
line = line.strip()
print(line)
qr_data = line
qr_img = qrcode.make(qr_data)
save_path = '4. QR코드 생성기\\' + qr_data + '.png'
qr_img.save(save_path)