python--DenyHttp项目(1)--GUI:tkinter☞ module 'tkinter' has no attribute 'messagebox'

AttributeError: module 'tkinter' has no attribute 'messagebox'

improt tkinter

from tkinter import *

import tkinter as tk

以上三种尝试之后,都没有解决问题,最后查找了python安装目录的tkinter模块,确实找到了messagebox.py

于是:

from tkinter import messagebox

问题解决

原文地址:https://www.cnblogs.com/langyao/p/7229760.html