摘要: 顶层窗口协议from tkinter import * root = Tk() # explicit root trees = [('The Larch!', 'light blue'), ('The Pine!', 'light green'), ('The Giant Redwood!', 'r 阅读全文
posted @ 2016-03-05 21:09 zw~菜园子 阅读(832) 评论(0) 推荐(0) 编辑
摘要: 用类实现自定义主件 from tkinter import * class HelloButton(Button): def __init__(self, parent=None, **config): # add callback method Button.__init__(self, pare 阅读全文
posted @ 2016-03-05 19:57 zw~菜园子 阅读(298) 评论(0) 推荐(0) 编辑
摘要: from tkinter import * root = Tk() 父实例 w = Label(root,text="hello") w.pack() root.mainloop() from tkinter import * widget = Label(None,text='hello') 会自 阅读全文
posted @ 2016-03-05 14:32 zw~菜园子 阅读(487) 评论(0) 推荐(0) 编辑
摘要: import getopt import sys import re import urllib.request import xml.etree.ElementTree as ET #有道词典api接口 URL= 'http://fanyi.youdao.com/openapi.do?keyfro 阅读全文
posted @ 2016-02-19 13:53 zw~菜园子 阅读(2785) 评论(0) 推荐(0) 编辑
摘要: https://pymotw.com/3/ 阅读全文
posted @ 2016-02-17 16:05 zw~菜园子 阅读(155) 评论(0) 推荐(0) 编辑
摘要: 原文地址:https://pymotw.com/2/SimpleXMLRPCServer/SimpleXMLRPCServer – Implements an XML-RPC server. Purpose: Implements an XML-RPC server. Available In: 2 阅读全文
posted @ 2016-02-17 11:53 zw~菜园子 阅读(730) 评论(0) 推荐(0) 编辑
摘要: 利用中国国家气象局免费api接口实现的获取天气预报程序from xml.dom import minidom from collections import namedtuple from termcolor import colored import sys import urllib.reque 阅读全文
posted @ 2016-02-17 09:19 zw~菜园子 阅读(468) 评论(0) 推荐(0) 编辑
摘要: 无论是谁,都最终在某一刻意识到时间的珍贵,并且几乎注定会因懂事太晚而多少有些后悔。病了要投医,病急了就很可能乱投医。可是书店里各种各样的关于‚时间管理‛的书籍多半于事无补—至少这是我手无策,另一方面是时间无情地流逝,恶性循环早已经形成:要做的事情越来越多,可用的时间越来越少;而因此时间越来越珍贵,时 阅读全文
posted @ 2016-02-16 11:23 zw~菜园子 阅读(171) 评论(0) 推荐(0) 编辑
摘要: 原文地址:http://www.wklken.me/posts/2012/02/18/python-xml-dom.html PYTHON解析XML[XML.DOM] Python解析xml[xml.dom] 需求 解决 XML文件 处理脚本 涉及方法 用到的包:xml.dom.minidom 文档 阅读全文
posted @ 2016-02-16 11:04 zw~菜园子 阅读(197) 评论(0) 推荐(0) 编辑
摘要: import xml.dom.minidom document = """\ <slideshow> <title>Demo slideshow</title> <slide><title>Slide title</title> <point>This is a demo</point> <poin 阅读全文
posted @ 2016-02-16 08:25 zw~菜园子 阅读(762) 评论(0) 推荐(0) 编辑