[Tutor] Problems with Python 3 and Tkinter

Kent Johnson kent37 at tds.net
Sat Feb 21 15:04:16 CET 2009


On Sat, Feb 21, 2009 at 8:05 AM, Peter Anderson
<peter.anderson at internode.on.net> wrote:
> By George I think I've done it!!!
>
> I was looking (yet again) through the Python 3 documentation and have
> changed the calculator.py script to:
>
> from tkinter import *
> from tkinter.messagebox import showerror
> from math import sqrt
> ...
>
> And it now works! I would still appreciate any help with trying to
> understand how tkinter and its modules are used. For example, exactly what
> modules are able to be used?

The docs at least list the modules, but without showing their contents:
http://docs.python.org/3.0/library/tkinter.html#tkinter-modules

To see what is in each package, one option is to start up a pydoc
server on your local machine, that gives a convenient way to browse
the modules. On Windows, for Python 2.5 at least, there is a Start
menu shortcut for this - Start / All Programs / Python 2.5 / Module
Docs.

You can also browse the source code in Python3.0\Lib\tkinter\

Kent
Kent


More information about the Tutor mailing list