[newbie] struggling wth tkinter
Jean Dubois
jeandubois314 at gmail.com
Sun Dec 8 03:57:55 EST 2013
Op zondag 8 december 2013 09:10:28 UTC+1 schreef Christian Gollwitzer:
> 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
Thank you very much Christian, this solves the problem
kind regards,
jean
More information about the Python-list
mailing list