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

问题解决


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM