开发者

Ttk on python 2.7 [closed]

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.

This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be开发者_JAVA技巧 on-topic here, this one was resolved in a way less likely to help future readers.

Closed 8 years ago.

Improve this question

I just installed python 2.7 from the python website, and was surprised to find that ttk wasn't included. Did I make a mistake installing, or is ttk really not included in the standard release? Anyway, where can I get a copy of ttk to install in my python instalation.

Note: I also heard that the activestate release has ttk. Should I unistall and use that instead?


I think you mean "ttk" not "tkk"

The following should solve your problems if this is the case:

from Tkinter import *
from ttk import *

for more about ttk and Tkinter in python2.7, reference: http://docs.python.org/library/ttk.html


Try this with Python 2.7:

from Tkinter import *
import Tkinter as ttk

It makes this example work, which wouldn't otherwise:

http://www.tkdocs.com/tutorial/grid.html


Check out this similar question on ServerFault: https://serverfault.com/questions/184544/python-2-7-and-tkinter .

Summary is that it is disabled by default.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜