python核心编程-GUI程序按钮与标签
2016-01-22 21:47
721 查看
#!/usr/bin/env python # -*- coding: UTF-8 -*- import Tkinter top = Tkinter.Tk() hello = Tkinter.Label(top, text = 'hello world!') hello.pack() quit = Tkinter.Button(top, text='QUIT', command=top.quit, bg='red', fg='white') quit.pack(fill=Tkinter.X, expand=1) Tkinter.mainloop()
输出:
相关文章推荐
- Python 格式化字符分类
- Python操作MySQL数据库
- python模块系列之 - copy
- python--datetime&time
- [Python]Python pip用国内镜像下载的办法
- Python标准库:内置函数dict(**kwarg)
- 用Python操纵MySQL
- Python工具之SQLAlchemy
- 【LEETCODE】81-Search in Rotated Sorted Array II [Python]
- Python中urllib2总结
- python 中导入自己定义的模块路径
- python爬hdu网页
- Python学习笔记——基础篇(1): 变量及其类型
- python自动化渗透
- Python下载大全
- Python 高级特性之 sorted( )
- Python 高级特性之 filter( )
- Python 高级特性之 reduce( )
- Python 高级特性之 map( )
- python 打印出所有的对象/模块的属性 方法