python组件总汇

[b]1)xml[/b]
xml.etree.ElementTree可处理简单的,对xpath支持的不好,比如attr不支持
xpath可使用py-dom-xpath库:
import xpath
from xml.dom import minidom

doc = minidom.parse("../config/user.xml")
names = xpath.find("//name[@alias]", doc)
print names


[b]2)html[/b]
Beautiful Soup
[url]http://www.crummy.com/software/BeautifulSoup/[/url]

[b]3)中文处理[/b]

[b]4)url编码解码[/b]
使用urllib库。

[b]5)图形处理[/b]
PIL
[url]http://www.pythonware.com/library/pil/handbook/introduction.htm[/url]

[b]6)excel[/b]
[url]http://www.python-excel.org/[/url]
读xlrd
写xlwt
以上不支持2007
支持2007
[url]http://pypi.python.org/pypi/openpyxl/1.1.0[/url]

[b]7)email[/b]
[url]http://canofy.iteye.com/blog/265600[/url]
[url]http://www.codecho.com/send-mail-with-attachment-using-python/[/url]

[b]8)json[/b]
simplejson
[url]http://pypi.python.org/pypi/simplejson/[/url]
[url]http://simplejson.readthedocs.org/en/latest/index.html[/url]
dumps把dict转换为json字符串,loads把json字符串转换为dict
python2.6默认支持

[b]9)http[/b]
urllib
urllib2支持修改header
不建议使用urllib1和2,因为http的一些特性比如缓存、压缩和重定向支持的不好
建议使用httplib2

[b]10)web[/b]
django用以提供http服务

[b]11)http file upload[/b]
poster
[url]http://atlee.ca/software/poster/[/url]

[b]12)部署[/b]
fabric,instagram团队使用
[url]http://docs.fabfile.org/en/1.4.2/index.html[/url]
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值