[Zope] Examining Properties of Returned Object
Samir Mishra
SamirMishra@cbuae.gov.ae
Tue, 20 May 2003 11:17:50 +0400
Thanks Troy. I wasn't clear in my earlier email...
I know how to get at the attribute/method of an object if I know what it's
name is. By using someobj.attributename or someobj.methodname() (or using
'getattr(....)'). But how do I enumerate all attributes & methods associated
with an object when I don't know the structure of the object (i.e., as if I
was exploring the object in a debugger)?
I've been using Dieter Maurer's DocFinderEverywhere extensively to get info
on generic objects returned by Zope (thanks Dieter, very helpful product,
especially for beginners), but obviously it has it's limitations.
Thanks again.
SM.
-----Original Message-----
From: Troy Farrell [mailto:troy@entheossoft.com]
Sent: Tuesday, May 20, 2003 08:40
To: Samir Mishra
Cc: 'zope@zope.org'
Subject: Re: [Zope] Examining Properties of Returned Object
What is calling your python script? Is it TAL(ES), DTML, another python
script, a zope product or an external method? Unfortunately, each of
these has some slightly different methods... Did you try
obj.myattribute
or
getattr(obj, myattribute)
or (in TAL)
obj/myattribute
Thanks.
Troy
Samir Mishra wrote:
> Hello all,
>
> I'm sure there's a way, just can't figure it out...
>
> I have a python script returning an object. The result set I'm actually
> interested in is wrapped somewhere within this object.
>
> My question: how can I examine the properties/methods of an object
returned
> by Python?
>
> Thanks in advance.
>
> Regards,
> Samir