python基础学习
2011-07-19 19:38
447 查看
今天找到了一个很好的学习python的知识,在这里做个记录!
from Tkinter import *
def on_click():
label['text'] = text.get()
root = Tk(className='bitunion')
label = Label(root)
label['text'] = 'be on your own'
label.pack()
text = StringVar()
text.set('change to what?')
entry = Entry(root)
entry['textvariable'] = text
entry.pack()
button = Button(root)
button['text'] = 'change it'
button['command'] = on_click
button.pack()
root.mainloop()
from Tkinter import *
def on_click():
label['text'] = text.get()
root = Tk(className='bitunion')
label = Label(root)
label['text'] = 'be on your own'
label.pack()
text = StringVar()
text.set('change to what?')
entry = Entry(root)
entry['textvariable'] = text
entry.pack()
button = Button(root)
button['text'] = 'change it'
button['command'] = on_click
button.pack()
root.mainloop()
相关文章推荐
- python 学习笔记之基础知识(2)
- Python 基础学习2
- python基础教程学习笔记 — 开篇
- python学习系列之python装饰器基础(3)---装饰器实现用户登录验证
- Python学习入门基础教程(learning Python)--3 Python分支结构和布尔逻辑
- python基础知识学习总结
- python基础教程学习笔记 — 准备Windows下开发环境
- Python基础教程学习(四)类的创建与继承
- Python新手学习基础之数据结构-序列2
- python基础学习(1)
- 安装pip 分类: ubuntu python基础学习 python Module software 问题总结 2014-02-19 09:16 229人阅读 评论(0) 收藏
- python学习基础1
- python数据持久存储:pickle模块的基本使用 分类: python python基础学习 python 小练习 2013-06-17 14:41 209人阅读 评论(0) 收藏
- Python基础学习总结
- python基础学习-There's an error in your program:expected an indented block错误解决
- 零基础入门学习python[小甲鱼]--就这么愉快地开始吧01
- python 基础学习小记
- Python入门基础学习 一
- Python学习之路——Linux基础之软件包
- Python基础学习(三)