如何用Python创建二维码
作者:互联网
from PIL import Image
import matplotlib.pyplot as plt
import qrcode
import image
import easygui
import tkinter as tk
from tkinter import filedialog
import image
tk.Tk().withdraw()
try:
qr_image = qrcode.make(easygui.enterbox('请输入二维码内容', '二维码生成器'))
easygui.msgbox("生成完毕", "二维码生成器", "好的")
qr_image.show()
if easygui.ynbox("是否保存?", "二维码生成器", ("是", "否")):
qr_image.save(".png")
easygui.msgbox("已保存", "二维码生成器", "好的")
except Exception as error:
easygui.msgbox("报错:" + str(error)+"\n检测到错误类型为:" +
str(sys.exc_info()[0]), "二维码生成器", "好的")
标签:Python,创建,image,生成器,二维码,msgbox,import,easygui 来源: https://blog.csdn.net/Robot_5/article/details/121885838