[newbie] struggling wth tkinter

Chris Angelico rosuav at gmail.com
Sun Dec 8 02:49:22 EST 2013


On Sun, Dec 8, 2013 at 6:40 PM, Jean Dubois <jeandubois314 at gmail.com> wrote:
> coolens at antec2:~$ python3 feet2meters.py
> ImportError: No module named Tkinter

In Python 3, the module's named tkinter instead of Tkinter. You should
be able to do the exact same import but with the lower-case name, or
if you need to support both:

try:
    import tkinter as tk
except ImportError:
    import Tkinter as tk

ChrisA



More information about the Python-list mailing list