[ZODB-Dev] Accessing Plone through ZEO back door?
Jim Roepcke
jim at roepcke.com
Sun Aug 22 01:28:51 EDT 2004
On Aug 21, 2004, at 4:37 PM, Kirby Urner wrote:
> Let me see if I've got this straight: Zeo serves the ZODB using
> ClientStorage, but isn't aware of Products, which are at the Zope
> layer (and above). So the reason I get errors when doing
The ZEO *server* isn't aware of products, but ZEO clients are. ZEO
clients is another way of saying "Zope instance that connects to a
remote ZODB", where remote ZODB implies "ZEO server".
Your script needs to make sure it adds SOFTWARE_HOME (which is
Zope/lib/python) to the sys.path, if it isn't already there. I can't
remember if you have to add anything in the INSTANCE_HOME if you're
using an INSTANCE_HOME, or if Zope figures that out.
> >>> storage = ClientStorage.ClientStorage(('localhost',8100))
> >>> db = DB(storage)
> >>> conn = db.open()
> >>> root = conn.root()
> >>> app = root['Application']
> >>> app.reset()
Since this code is acting as a client to the ZEO server, it does need
the products.
Jim
--
Jim Roepcke
Roepcke Computing Solutions: http://www.roepcke.com/
Jim's weblog: http://jim.roepcke.com/
More information about the ZODB-Dev
mailing list