简体   繁体   English

python中的ttk和quitter模块

[英]ttk and quitter modules in python

I'm learning Tkinter using online tutorials (like http://zetcode.com/gui/tkinter/layout/ ) and others. 我正在使用在线教程(例如http://zetcode.com/gui/tkinter/layout/ )和其他教程来学习Tkinter。 I have python 2.6.6 on Slackware 13.37. 我在Slackware 13.37上有python 2.6.6。

When I try to import ttk or quitter I get error messages telling me there is no such module. 当我尝试导入ttk或quitter时,出现错误消息,告诉我没有这样的模块。 Here's what I've done: 这是我所做的:

from Tkinter import Tk, W, E from ttk import Frame, Button, Label, Style from ttk import Entry 从Tkinter导入Tk,W,E从ttk导入框架,按钮,标签,样式从ttk导入条目

or 要么

from quitter import Quitter 从戒烟器进口戒烟器

Can anyone tell me what's going on? 谁能告诉我怎么回事? I've looked at the other questions on this site concerning this question and none of them have helped me. 我已经查看了该站点上与该问题有关的其他问题,但没有一个对我有帮助。

I can't find a ttk or quitter module online, or any site that has any info that solves my problem. 我找不到在线的ttk或退出模块,或者任何具有解决我的问题的信息的网站。

Programming Python 2nd edition has examples with quitter that don't work. 《 Python 2nd编程》中的示例带有退出器,这些示例不起作用。 What I'm trying to do is to have a popup window that will allow users to input some info and have the box go away when the info is entered. 我想做的是有一个弹出窗口,该窗口将允许用户输入一些信息,并在输入信息时使该框消失。

Thanks 谢谢

To use ttk from Python, you need a separate install you can get from here . 要从Python使用ttk,您需要单独安装,可以从此处获得。 Also threre is no quitter modyle in the standard library (not sure where you can get it) . 同样,在标准库中,threre也不是退出者(不确定在哪里可以得到它)

EDIT: Quitter module seems to be from a book "Programming Python, 3rd Edition". 编辑:退出模块似乎来自于《 Programming Python,第三版》。 Here's the quitter source code. 这是退出者的源代码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM