On Sat, 7 Dec 2013 08:52:08 -0800 (PST), Jean Dubois <jeandubois...@gmail.com> wrote:
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

Thanks for supplying the complete traceback. But you should also tell the python version and what OS. I'll guess python 3.3 on Linux.

Finally, what version tk are you running? These widgets were introduced in tk 8.5

Since it failed on the second import, none of the rest of the code matters. However, since you're not running it from a terminal window, it's conceivable that your ide is affecting the result.

--
DaveA

--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to