[DB-SIG] postgresql-python return type

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


Hello,
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.

The
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
command
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 ...>

Thanks,
Karl



Karl Diedrich 
died9501@uidaho.edu
http://www.uidaho.edu/~died9501/
University of Idaho
Environmental Biotechnology Institute
University of Idaho
Food Research Center 103
Moscow, ID 83844-1052