Has anyone else had this problem? I have re-installed twice with the same result. The pre-install of 2.6 on the Mac had a lib-tk folder with the correct modules. Nothing like this is being created 开发者_Go百科for 3.1. There is a Tkinter folder but it contains only a few obscure modules. Importing _tkinter and tkinter works but not Tkinter and all of the example programs fail.
Tkinter
was substantially refactored in Python 3 from a set of modules into packages. Tkinter
is now tkinter
and the lib-tk
folder no longer exists. At least some of the example tkinter programs included in the OS X 3.1 distribution work if you ensure they are being launched under Python 3 and not Python 2. See the Python 3.1 library reference.
精彩评论