[newbie] struggling wth tkinter
Christian Gollwitzer
auriocus at gmx.de
Sun Dec 8 03:10:28 EST 2013
Am 07.12.13 17:52, schrieb Jean Dubois:
> I'm trying to go through a tutorial on tkinter which has the code below as an example. The only thing I see when running it is a little popup with "Click mouse here to quit" which works as expected but always shows the following error-message.
> However the "main" window which should let you enter the numbers is not shown.
>
> This is the quit error message:
> Traceback (most recent call last):
> File "./feet2meters.py", line 3, in <module>
> from tkinter import ttk
> ImportError: cannot import name ttk
>
> This is the code:
> #!/usr/bin/env python
> from tkinter import *
> from tkinter import ttk
With my python2, it works to replace the import by
from Tkinter import *
import ttk
Christian
More information about the Python-list
mailing list