When I answer Tkinter questions I usually try and run the code myself, but sometimes I get this error:
Traceback (most recent call last):
File "C:Python27pygame2.py", line 1, in <module>
from tkinter import *
ImportError: No module named tkinter
When I look at the question I see they import tkinter
with a lower-case t:
from tkinter import *
I always import Tkinter
with a capital T:
from Tkinter import *
Which always works for me. What is the difference between using tkinter
and Tkinter
?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…