[Zope] How to access ZODB from python code
Gabriel Genellina
gagenellina@softlab.com.ar
Mon, 24 Mar 2003 19:25:51 -0300
Hi
I want to get access to some Zope objects stored in ZODB, from *outside* of
any other Zope object (so I dont have anything to call getPhysicalRoot() or
restrictedTraverse() on) but from *inside* python code running in the Zope
process.
This doesnt work:
from Zope import Zope
app = Zope.app()
app.restrictedTraverse(...)
The Zope server freezes, I guess there is a deadlock there.
Currently, I'm using a single instance of a bogus product (a singleton)
stored at the root of the Zope hierarchy, just to get access to the ZODB. I
dont like it being a product nor being stored in the Zope database, but I
cant access the Zope DB otherwise.
How could I do that?
Gabriel Genellina
Softlab SRL