作者hsiaoeddie (eddie)
看板Python
标题[问题] tkinter找不到属性Tk()
时间Wed Apr 17 20:33:54 2019
最近在学习tkinter,使用spyder写了下列程式
https://i.imgur.com/chMRGXP.jpg
但却显示
AttributeError: module 'tkinter' has no attribute 'Tk'
-----
Sent from JPTT on my iPhone
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 123.205.14.121
※ 文章网址: https://webptt.com/cn.aspx?n=bbs/Python/M.1555504436.A.EFA.html
1F:→ HenryLiKing: 你应该是档名取到 tkinter 了 注意一下档名 04/17 20:52
我在网路爬文有发现这个问题,但我已经把档名改成abc.py了仍然会跑出错误讯息
※ 编辑: hsiaoeddie (42.76.172.204), 04/18/2019 09:00:20
2F:推 thefattiger: tkinter.__dict__检查一下 04/18 20:49
3F:推 lemon651: 同个资料夹内有tkinker吗 04/19 10:33
4F:→ samuelc: 我只注意到最後一行 Mainpool 04/19 23:20
哈哈哈哈我发现了,该回来了
※ 编辑: hsiaoeddie (123.205.14.121), 04/20/2019 20:01:09
5F:推 Samchen: 加一行 from tkinter import * ? 04/28 10:01