Web 2.0 网站架构、优化 数据库架构
标签类目:pil

python中的常用模块

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

http://linux.duke.edu/projects/urlgrabber/

—————————————————–
1.MySQL-Python

http://mysql-python.sourceforge.net/

—————————————————–
1.pyScripter
2.Python for Delphi

http://mmm-experts.com/Products.aspx

—————————————————–
1.Python Cookbook

http://aspn.activestate.com/ASPN/Python/Cookbook/

—————————————————–
1.pygame

http://www.pygame.org/news.html

——————————————————
1.pymedia

http://www.pymedia.org

——————————————————
1.pydbf

http://dbfpy.sourceforge.net/

——————————————————
1.Pexpect

http://pexpect.sourceforge.net/

——————————————————
1.dabo
desktop application frameworks

http://dabodev.com/

——————————————————
1.pySerial

http://pyserial.sourceforge.net/

http://wiki.woodpecker.org.cn/moin/PySerial

——————————————————
1.python’s doc

http://wiki.woodpecker.org.cn/moin/PythonZhDoc

——————————————————
1.The Visual Module of VPython(3D)

http://vpython.org/index.html

——————————————————
1.PyLucene

http://pylucene.osafoundation.org/

——————————————————
1.DBUils

http://www.webwareforpython.org/DBUtils

——————————————————
1.http://happyiww.popo.blog.163.com/blog/
a good people’s blog
——————————————————
1.AppleScript,OSAComponents,HtmlCalendar

http://freespace.virgin.net/hamish.sanderson/index.html

——————————————————
1.Pypcap

http://code.google.com/p/pypcap/

http://monkey.org/~dugsong/dpkt/

http://www.winpcap.org/install/default.htm

python-memcached client module for memcached

Kodos,python的正则表达式调试工具,

PLY (Python Lex-Yacc)

http://www.dabeaz.com/ply/

正在用它写汇编器.
wxPython – GUI Framework
omniORBpy – CORBA Library
ZODB3 – an OODB implement
ReportLab – PDF generating solution
numpy+scipy+matplotlib

hachoir 各种多媒体元数据解析
python-orge 演示用
数据库的:
sqlalchemy
sqlobject
MySQL-python (easy_install的时候就是这个名字)

routes
beaker
两个模板引擎:
genshi
mako
paster

另外还有知道的
PyCrypto 加密的
paramiko 这个可以帮你写sftp,比twisted里面的那个好用一些
twisted 写服务器玩的
PyOpenGL
PyGame
Psyco 传说可以加速你的python程序
PIL (Python Image Library) 处理图片
PyObjC 这个是苹果上用的,写Cocoa程序

Python desktop client GUI application:
wxPython
PyOpenGL
PyXML
ZSI
davlib.py
ChartDirector
一个支持多种语言的图表库,无论是效果还是效率,都比jfreechart高。

python 安装mysql_db、PIL

tar zxf MySQL-python-1.2.2.tar.gz
修改 site.cfg 文件,指定 mysql_config 安装位置
mysql_config = /usr/bin/mysql_config
python setup.py build
sudo python setup.py install

在apache 上设置 PYTHON_EGG_CACHE 路径使默认可读写
SetEnv PYTHON_EGG_CACHE /path/to/dir

要想编译这个模块,就必须要先安装开发版的mysql,这里不说mysql怎么安装,假设装好了,并且装到/opt/mysql下。
这个目录下有一个叫 site.cfg 的文件,我们要修改的设置就在这里面,它的内容如下:

[options]
# embedded: link against the embedded server library
# threadsafe: use the threadsafe client
# static: link against a static library (probably required for embedded)

embedded = False
threadsafe = True
static = False

# The path to mysql_config.
# Only use this if mysql_config is not on your PATH, or you have some weird
# setup that requires it.
#mysql_config = /usr/local/bin/mysql_config

# The Windows registry key for MySQL.
# This has to be set for Windows builds to work.
# Only change this if you have a different version.
registry_key = SOFTWARE\MySQL AB\MySQL Server 5.0

以#开头的是注释,这里可能需要修改的有两个,一个是mysql_config,一个是threadsafe。往往编译不过就是这两个造成的。
mysql_config是指定mysql_config这个文件的路径,一般在mysql安装路径下,这里mysql装到/opt/mysql,因此取消mysql_config这行的注释,修改为
mysql_config=/opt/mysql/bin/mysql_config
一般来说这样就可以编译了。但是,如果在编译到最后时,报告链接不上libmysqlclient_r.so的话,还需要把threadsafe设置为False。

tar zxvf Imaging-1.1.6.tar.gz
cd Imaging-1.1.6
python setup.py build_ext -i
python selftest.py
python setup.py install
安装完毕后,可在python安装目录下的site-packages找到PIL安装目录。

返回顶部