常用的python模块
from link http://www.tt010.net/cms/show_article/1057.html
发表评论
Post by : BossAdmin @[2009-12-12 17:11:20] views:115
adodb:我们领导推荐的数据库连接组件
bsddb3:BerkeleyDB的连接组件
Cheetah-1.0:我比较喜欢这个版本的cheetah
cherrypy:一个WEB framework
ctypes:用来调用动态链接库
DBUtils:数据库连接池
django:一个WEB framework
docutils:用来写文档的
dpkt:数据包的解包和组包
MySQLdb:连接MySQL数据库的
py2exe:用来生成windows可执行文件
Pylons:我们领导推荐的web framework
pysqlite2:SQLite的连接组件
pythonwin:Python的Windows扩展
setuptools:无奈,PEAK的一套python包管理机制
sqlalchemy:数据库连接池
SQLObject:数据库连接池
twisted:巨无霸的网络编程框架
wxPython-2.6:因为需要保持与linux相同的版本才没用最新的,GUI编程框架
pypcap:抓包的
python-dnet:控制网络安全的其他设备
pyevent:Python的事件支持
pydot:画图的,graphiz
sendpkt:Python发包
simplejson:JSON的支持
DPKT:raw-scoket网络编程
Cx-oracle:连接oracle的好东东
Mechanize:爬虫连接网站常用
PIL:图像处理工具包
reportlab for PDF 文件。
PyQt4 for GUI界面
feedparser: rss解析
chardet:编码检测
scons: 项目构建工具,写好了模板用起来还是很方便的
scapy: 网络包构建分析框架,可编程的wireshark,有兴趣的google "Silver Needle in the Skype"
pefile : windows pe文件解析器
winpdb: 自己的程序或者用别的库不太明白的时候就靠它了
pywmi: 省了好多折腾功夫
pylint: 培养良好的编码习惯
下面是准备用的,不做评论:
pygccxml
pyparsing
pymacs
idapython
paimei
pysvn
pyLucene
wikidpad
1.Python操作PDF文件
2.Python連接PostgreSQL引擎
3.Python的.NET2.0的曲線表
http://pybrary.net/
------------------
1.Python Image Libary
2.Tkinter Libary
http://www.pythonware.com/index.htm
------------------
1.Karrigell
http://karrigell.sourceforge.net/
------------------
1.The Standard Python Libary
http://effbot.org/librarybook/
------------------
1.Python操作PDF的Libary
http://reportlab.org/
------------------
1.Python cURL Libary
http://pycurl.sourceforge.net/
------------------
1.urlgrabber
htt
相关文档:
# -*- coding: cp936 -*-
from email.MIMEText import MIMEText
from email.MIMEMultipart import MIMEMultipart
import smtplib
#创建一个带附件的实例
msg = MIMEMultipart()
#构造附件
att = MIMEText(open('e:\\test.txt').read(), 'base64', 'gb2312')
att["Content-Type"] = 'application/ ......
本篇将介绍python中sys, getopt模块处理命令行参数
如果想对python脚本传参数,python中对应的argc, argv(c语言的命令行参数)是什么呢?
需要模块:sys
参数个数:len(sys.argv)
脚本名: sys.argv[0]
参数1: sys.argv[1]
参数2: sys.argv[2]
test.py
1
import ......
找了半天没找着,终于在英文站点上找到,还有感谢群里的石头和球迷
>>> s = datetime.datetime(2009,1,1)
>>> time.mktime(s.timetuple())
1230739200.0
别外付一个python对时间的一些函数,很好用的
我们先导入必须用到的一个module
>>> import time
设置一个时间的格式,下面会用到
& ......
"""A parser for HTML and XHTML."""
# This file is based on sgmllib.py, but the API is slightly different.
# XXX There should be a way to distinguish between PCDATA (parsed
# character data -- the normal case), RCDATA (replaceable character
# data -- only char and entity references and end tags a ......
每个模块都有一个名称,在模块中可以通过语句来找出模块的名称。这在一个场合特别有用
——就如前面所提到的,当一个模块被第一次输入的时候,这个模块的主块将被运行。
每个Python模块都有它的__name__,如果它是'__main__',这说明这个模块被用户单独运行,
我们可以进行相应的恰当操作。
#!/usr/bin/pytho ......