介绍文章 www.free-soft.org/FSM/english/issue01/fog.html For Linux psycopg A PostgreSQL database adapter for Python. [Open Source, GPL] initd.org/projects/psycopg1 freshmeat.net/projects/psycopg/ For Windows: stickpeople.com/projects/python/win-psycopg/ 一个例子: import psycopg # Connect to a DB, e.g., the test DB on your localhost, and get a cursor connection = psycopg.connect("user=postgres password=12345 dbname=test") cursor = connection.cursor( ) cursor.execute("select * from account") results = cursor.fetchall( ) print results connection.close( )