tags:

views:

41

answers:

2

when i type from Tkinter import ttk it say that there is no module named ttk and also on many websites online the t in tkinter is always lowercase but when i type tkinter in python it throws an error. why is that?

+1  A: 

To use ttk from Python, you need a separate download and install which you can find here.

Python is case-sensitive (like most programming languages), but "many websites" are not (like most human beings) so it's a perfectly understandable sloppiness on those "many websites"' part to spell Tkinter in the wrong case. Hey, you yourself break English rules by using lower case in words starting sentences, twice in your short question, you should sympathize with the use of wrong casing in those "many websites", and definitely shouldn't be surprised by it!

Alex Martelli
Thanks for that answer, i for got that i wasn't the only lazy one, but i was wondering on the site that you gave a link to what should I click on to download ttk? I saw more than one thing to download and i wasn't sure which to pick.
G.SINGH
@g.singh, best is probably http://pypi.python.org/pypi/pyttk/ -- pypi is often the best repo from which to download Python extensions. Note that it's a .tar.gz file so after download you'll have to unpack it and install it "manually" (python setup.py install with your favorite Python >= 2.5). Before installing you'll also need ttk separately installed with the Tcl-Tk installation you're using, of course (pyttk is the Python interface to ttk, it is not the ttk functionality itself).
Alex Martelli
A: 

Tkinter in python 2.6 is capitalized, in python 3 it is lowercase, tkinter

pygabriel