[DB-SIG] postgresql-python return type

Karl Thomas Diedrich died9501@uidaho.edu
Mon, 19 Jun 2000 10:38:56 -0700 (PDT)

I am using postgresql-python and pygnome to write an application.
I am having troubles dispaying the results of queries with pygnome. I
wanted to know if anyone knew how to do this or where to look.

data type of the results of queries is <pgqueryobject at ...>.
targetSearchResult = self.cnx.query( """SELECT description,
            accession, start, targetSeq, target.name, mismatch, oligoSeq
            FROM target, oligo
            WHERE description LIKE '%""" + keyword + """%'
            AND target.name = oligo.name
            ORDER BY mismatch DESC;"""
type(tagetSearchResult) = <pgqueryobject at ...>
I can display the value(query results) of the object with the print
print targetSearchResult

I tried formatting it as a string but I get the object type name instead
of the value
format = '%s'
results = format % (targetSearchResult)
print reults   =    <pgqueryobject at ...>


Karl Diedrich 
University of Idaho
Environmental Biotechnology Institute
University of Idaho
Food Research Center 103
Moscow, ID 83844-1052