On Sat, 10 Oct 2009, Adrian Klaver wrote:
One way Using psycopg2 DSN = "dbname=? user=? port=? host=?" con = psycopg2.connection(DSN) cur = con.cursor() cur.execute(statement1) cur.execute(statement2) .... con.commit() Another way, not tested, is triple quote entire block above and pass it to cur.execute.
Both work with pysqlite so I imagine they'll work with postgres as well. Rich -- Richard B. Shepard, Ph.D. | Integrity Credibility Applied Ecosystem Services, Inc. | Innovation <http://www.appl-ecosys.com> Voice: 503-667-4517 Fax: 503-667-8863 -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general