常用的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/ ......
找了半天没找着,终于在英文站点上找到,还有感谢群里的石头和球迷
>>> s = datetime.datetime(2009,1,1)
>>> time.mktime(s.timetuple())
1230739200.0
别外付一个python对时间的一些函数,很好用的
我们先导入必须用到的一个module
>>> import time
设置一个时间的格式,下面会用到
& ......
作者:老王
Python似乎很讨厌修饰符,没有常见的static语法。其静态方法的实现大致有以下两种方法:
第一种方式(staticmethod):
>>> class Foo:
str = "I'm a static method."
def ba ......
使用pdb调试Python程序
本文讨论在没有方便的IDE工具可用的情况下,使用pdb调试python程序
源码例子
例如,有模拟税收计算的程序:
#!/usr/bin/python
def debug_demo(val):
if val &l ......
python 2.4中datetime有strftime方法而无strptime方法
而python2.5中这两个方法均有,而我的开发环境正好是python 2.5,而运行环境则是python 2.4
开发环境下调试好的程序,在服务器上就不run。查了一下python的官方文档
,斜体写着:New
in version 2.5.
不兼容的代码如下:
Python语言
:
test_strptime.py
res ......