[Zope] Python Scripts, dir() and attributes.

tom smith tom@othermedia.com
Mon, 21 May 2001 16:41:51 +0100


I'm trying to get the value of a ZSQL search (integer) using a
PythonScript...

l = [ ]
results = context.select_highest_id_from_answers()
for f in results:
    l.append(f)

Return l

...but my function is returning a db results instance. Like this...

 [<r instance at 0E2A5A00>]


I have two questions. Firstly, how to get the value of a results set, And
secondly is there a nice way to inspect objects using python scripts.

It'd be nice (and kinda an obvious thing to want to do) if I could see what
attributes any given object has...(or even what methods I could call on it)
from within the browser window

thanks

Tom



-- 
tom smith | tom@othermedia.com
http://www.othermedia.com/blog
tel 020 8541 5355  | fax 020 8541 5507
11 penrhyn road, kingston-upon-thames, london KT1 2BZ