Python的GUI简单介绍
2016-03-17 14:52
701 查看
下面是利用python自带的tkinter做的一个widiget.
from tkinter import * class MainWidiget(Frame): def __init__(self,master = None): super().__init__(master) self.pack() self.createwidiget() def createwidiget(self): self.helloLabel = Label(self, text='Hello, world!') self.helloLabel.pack() self.quitButton = Button(self, text='Quit', command=self.quit) self.quitButton.pack() m = MainWidiget() m.master.title('hello,world') m.mainloop()
相关文章推荐
- python模块
- python strip()函数 介绍
- Python学习常用第三方模块:PIL,生成验证码
- pyPdf和pyPdf2在合并pdf时的那个异常
- python字典常见操作
- python学习爬虫
- Lintcode打劫房屋
- python with语句执行过程
- 文章标题
- python要点记录
- Python之数组(array)使用方法总结与Numpy中的数组用法
- MichaelBoselowitz/pygit2-examples: Examples of some "porcelain" git commands implemented with python bindings (pygit2) to the libgit2 library.
- Python代码优化及技巧笔记(二)
- Python代码优化及技巧笔记(二)
- Ubuntu下配置python完成爬虫任务(笔记一)
- [python]使用python实现Hadoop MapReduce程序:计算一组数据的均值和方差
- Python编程学习笔记 随时更新
- 八大排序算法的 Python 实现
- Python任务调度模块 – APScheduler
- 【Python】Python Mako模板使用