A tip on debugging Zope 2 with ZEO
Tue, Apr 8, 2008,
100 Words
I'm having some troubles with CacheFu, and I've resorted to deleting some objects from a debug prompt, which is very easy to get at if one runs the Zope under ZEO. Still, I couldn't delete the objects because I was getting Unauthorized errors. Luckily, there is #plone, from which I got the following tip:
<naro> from AccessControl.SecurityManagement import newSecurityManager <naro> user = app.acl_users.getUser('admin') <naro> newSecurityManager(None, user)
Thanks, naro!
Update: I realize now that I didn't write how to connect to ZEO:
#bin/instance debug
or
#bin/zopectl debug
This will connect the ZEO client and drop you in a python shell
Previous: Ubuntu Hardy Heron: some things are bad