Chris McDonough wrote:

Note that FWIW, you can also do (on UNIX):

zopectl run <scriptname>

> .. which will run a script with the name "app" set up as the root Zope
> application object.  This might be the easiest way to run scripts which
> need to operate against Zope objects going forward.
> - C

I tried this, but I'm getting local variable 'app' referenced before assignment error.

Portion of my script:

def main():
#    import Zope
#    Zope.configure('/home/local/plone/test2.7zope/etc/zope.conf')
#    Zope.startup()

from import PermissiveSecurityPolicy, AnonymousUser, OmnipotentUser
newSecurityManager(None, OmnipotentUser().__of__(app))

- Gerry

Zope-Dev maillist - [EMAIL PROTECTED]
** No cross posts or HTML encoding! **
(Related lists - )

Reply via email to