[Zope] PostgreSQL and external method

Rene Pijlman rpijlman@wanadoo.nl
Wed, 20 Jun 2001 21:43:47 +0200


> def hello():
>      import sys
>      from pg import DB
>      conn = DB('demodb',user='skippy')
>      x = conn.query("SELECT * from testtable")
>      return x
> 
> It works from the Python command line. 

What does that mean exactly? The code just defines a function.

>But in my Zope page I get <pg query result>

What is the code you use to process and print x?

Groeten,
Rene Pijlman