如何用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的二维数组操作


下一篇:测量运行1段AutoHotkey脚本代码所需消耗的时间