readme.linux
来自「关系型数据库 Postgresql 6.5.2」· LINUX 代码 · 共 34 行
LINUX
34 行
Thanks to thilo@eevolute.com for this README and the RPMINSTALLING PyGreSQL on Redhat Linux 5.1 or 5.2==============================================Things are pretty easy on Redhat Linux. You can either get a precompiledRPM package from ftp://www.eevolute.com/pub/python/or try in compile and install it yourself:bash$ make redhat # this just compiles the module as a shared objectcc -fpic -shared -o _pg.so -I/usr/include/python1.5 pgmodule.c -lpqbash$ python # you can test it from your local directoryPython 1.5.1 (#1, May 6 1998, 01:48:27) [GCC 2.7.2.3] on linux-i386Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam>>> import _pg>>> db = _pg.connect('thilo', 'localhost')>>> db.query("INSERT INTO test VALUES ('ping', 'pong')")18304>>> db.query("SELECT * FROM test")eins|zwei----+----ping|pong(1 row)bash$ su # Yow! Seems to work - now install it properlybash# cp _pg.so /usr/lib/python1.5/lib-dynload done!
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?