# Tkinter vs. tkinter, Python 2.6 vs 3.0



## SeaHag (Jul 25, 2010)

I'm trying to do GUI programming with Python and Tcl/tk with no luck. The first few lines of the file are:


```
#!/usr/bin/env python
#Note: Tkinter has been renamed to tkinter in Python 3.0. 

from Tkinter import *
from Tkinter import ttk
.
.
.
```

If I try to do a command in my script like:


```
frame.append(ttk.Frame(root, padding="1 1 1 1", relief="sunken"))
```

I get the error:


```
NameError: name 'ttk' is not defined
```

If I try to install x11-toolkits/tkinter it installs python 2.6. How can I run python 2.6 and python 3.0 scripts on the same system? tkinter seems to be for pyhton 2.6 and it seems it's renamed to "Tkinter" with a capitol "T" for Python 3.0. I don't see any x11-toolkits/Tkinter with the capitol "T". how do we setup Tkinter for Python 3.0?


Added 7-26-2010:

I got it. It was pilot error. I saw in my build settings (I use Geany) It was calling python not python3.1 to run the script. I changed it and now it works. Such a dumb error.


----------

