# DKUUG PYTHON LECTURE March 25 2008
# Copyright 2008 Svenne Krap. 
# This software is released under the BSD license.
# Please see the attached license

import pgdb
cnx = pgdb.connect(database='test')
cur = cnx.cursor()
cur.execute("select current_timestamp")
row = cur.fetchone()
print row[0]
cur.execute("select * from records where not tekst = %s",("To",))
print cur.fetchall()
for row in cur.description:
    print row[0] + " " + row[1]

    

