[Zope] import Zope ...
Terry Hancock
hancock@anansispaceworks.com
Tue, 29 Apr 2003 19:21:16 -0700
On Tuesday 29 April 2003 06:43 pm, Bakhtiar A Hamid wrote:
> Terry Hancock:
> > I haven't found where the "Root Folder" is imported.
> > My understanding is that once I have the root object
> > to the ZODB/OFS that I'll be able to access everything
> > else by examining attributes, but I don't know how to
> > get the top level object. (And I assume I must be able
> > to access it, because why else would there be a
> > conflict?)
>
> iirc
> >>> import Zope
> >>> app=Zope.app()
>
> app is now your root, and we can do stuff with it.
THANK YOU!!
That's it. dir(Zope) gives a bewildering array of choices,
(also some of the examples suggest it might be in
ZPublisher, etc). So this is not at all obvious, and I
couldn't find any mention of it in the Zope Developer's
Guide. It tells all about what to do with a root ZODB
object, but not how to get the first one! Or at least, if
it does, I couldn't find it.
I'm off to go add a comment. ;-)
Thanks again,
Terry
--
Terry Hancock ( hancock at anansispaceworks.com )
Anansi Spaceworks http://www.anansispaceworks.com