python
yyyzlf
这个作者很懒,什么都没留下…
展开
-
python 读xml文件
def getText(self,nodelist): rc="" for node in nodelist: if node.nodeType == node.TEXT_NODE or node.nodeType == node.CDATA_SECTION_NODE: rc = rc + node.data return rc def parse原创 2010-04-16 13:49:00 · 698 阅读 · 0 评论 -
python 写xml文件
import xml.dom.minidomimpl = xml.dom.minidom.getDOMImplementation()dom = impl.createDocument(None, catalog, None)root = dom.documentElementitem = dom.createElement(item)text = dom.create原创 2010-04-06 16:58:00 · 1224 阅读 · 0 评论 -
python 读http小记
conn = httplib.HTTPConnection(EPG_IP + ":" + HTTP_PORT) url = FAV_URL_PARTH +"userid=" + USER_ID + FAV_DIR_MODIFY param = +categoryid+ +categoryname+原创 2010-04-19 16:34:00 · 518 阅读 · 0 评论 -
python 工具
python包一定要包含到环境变量中:用spe的时候:要包含c:/Program Files/Python26/libs 首先要安装wxPython2.8-win32-ansi-2.8.10.1-py26.exe然后需要安装SPE-0[1].8.3.c-wx2.6.1.0-py24.exe 深入python 电子书http://d.download.csdn.net/d原创 2010-04-22 16:08:00 · 519 阅读 · 0 评论 -
python传参
<br />def ff(**a): print a ff(x=1,y=2) ------------------ {'y': 2, 'x': 1} def gg(*b): print b gg(1,2,4,5,6,7) ------------ (1, 2, 4, 5, 6, 7)原创 2010-11-15 15:55:00 · 621 阅读 · 0 评论