[Zope] ZopeObject2HTML (Reflection)

seb bacon seb@jamkit.com
11 Jan 2002 14:18:03 +0000


Have a look at the inspect module (new in 2.1)

seb

On Fri, 2002-01-11 at 13:36, zopestoller@thomas-guettler.de wrote:
> No, I was looking for something that does this at runtime. 
> Something like http://localhost:8080/my_object/introspection -->
> Which results in a HTML Page with information about my_object.
> With information I mean: method names, attribute names, base classes ...
> 
> I would like to write this if noone has done this. But how can I 
> access this information? Sorry, I quite new to python. 
> my_object.__methods__ does not work in a python product.
> dir(my_object) does. But it has not much information.
> 
>  Does someone know how to get this?
> 
> Chris McDonough <chrism@zope.com> schrieb am 11.01.2002, 14:12:04:
> > Look for "HappyDoc" by Doug Hellmann...
> > 
> > zopestoller@thomas-guettler.de wrote:
> > > Has someone written a script which renders a zope object
> > > to HTML?
> > > 
> > > I would like to know: which base classes this object has, 
> > >  which methods it has, which properties it has ...
> > > 
> > > I think it is quite easy if you know python good. I am a python newbie.
> > > __members__ doesn't seem to work on my zope object (inherited from
> > > folder).
> > > 
> > >  Can someone help?
> > >    guettli
> > > 
> > > _______________________________________________
> > > Zope maillist  -  Zope@zope.org
> > > http://lists.zope.org/mailman/listinfo/zope
> > > **   No cross posts or HTML encoding!  **
> > > (Related lists - 
> > >  http://lists.zope.org/mailman/listinfo/zope-announce
> > >  http://lists.zope.org/mailman/listinfo/zope-dev )
> > > 
> > 
> > 
> > -- 
> > Chris McDonough                    Zope Corporation
> > http://www.zope.org             http://www.zope.com
> > "Killing hundreds of birds with thousands of stones"
> 
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists - 
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )