Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #61257
| From | Terry Reedy <tjreedy@udel.edu> |
|---|---|
| Subject | Re: [newbie] struggling wth tkinter |
| Date | 2013-12-07 16:11 -0500 |
| References | <40121057-3c98-4f50-84b3-fd320fe2cedc@googlegroups.com> <40121057-3c98-4f50-84b3-fd320fe2cedc@googlegroups.com> <almarsoft.1101845216682379224@news.gmane.org> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.3709.1386450711.18130.python-list@python.org> (permalink) |
On 12/7/2013 1:12 PM, Dave Angel wrote: > On Sat, 7 Dec 2013 08:52:08 -0800 (PST), Jean Dubois > <jeandubois314@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 That is supposed to work. >> 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 In 8.4, they were in the Tile extension. I do not know if that will work. Better, probably, to upgrade. > > 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. Until you are able to import ttk, I believe you could remove the import and all 'ttk.' appearances, as I do not see anything ttk-specific. -- Terry Jan Reedy
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[newbie] struggling wth tkinter Jean Dubois <jeandubois314@gmail.com> - 2013-12-07 08:52 -0800
Re: [newbie] struggling wth tkinter Dave Angel <davea@davea.name> - 2013-12-07 13:12 -0500
Re: [newbie] struggling wth tkinter Jean Dubois <jeandubois314@gmail.com> - 2013-12-07 23:40 -0800
Re: [newbie] struggling wth tkinter Chris Angelico <rosuav@gmail.com> - 2013-12-08 18:49 +1100
Re: [newbie] struggling wth tkinter Jean Dubois <jeandubois314@gmail.com> - 2013-12-08 01:15 -0800
Re: [newbie] struggling wth tkinter Cousin Stanley <cousinstanley@gmail.com> - 2013-12-07 11:23 -0700
Re: [newbie] struggling wth tkinter Jean Dubois <jeandubois314@gmail.com> - 2013-12-07 23:45 -0800
Re: [newbie] struggling wth tkinter Dave Angel <davea@davea.name> - 2013-12-08 09:16 -0500
Re: [newbie] struggling wth tkinter Jean Dubois <jeandubois314@gmail.com> - 2013-12-08 07:53 -0800
Re: [newbie] struggling wth tkinter Cousin Stanley <cousinstanley@gmail.com> - 2013-12-08 07:16 -0700
Re: [newbie] struggling wth tkinter Terry Reedy <tjreedy@udel.edu> - 2013-12-07 16:11 -0500
Re: [newbie] struggling wth tkinter Christian Gollwitzer <auriocus@gmx.de> - 2013-12-08 09:10 +0100
Re: [newbie] struggling wth tkinter Jean Dubois <jeandubois314@gmail.com> - 2013-12-08 00:57 -0800
csiph-web