import pgdb from fileformat import read_actionlist, write_actionlist from util import * connection = pgdb.connect(database='oysteini_pbb2', user='oysteini_pbb', password='lio5Aide', host='postgres.pvv.ntnu.no'); c = connection.cursor() c.execute('SELECT * from bok') print fetchall_dict(c)