Python Command line {was => Re: [Zope] ANN: Core Session Tracking 0.8 released}
Chris McDonough
chrism@digicool.com
Wed, 4 Apr 2001 12:36:57 -0400
> > As an aside, this command line access looks very nice. I am very
curious..
> >
> > Please how do you do this?
>
> You either need to:
>
> - Shut down Zope
> - or be running ZEO
That's right. The basics are:
cd to your Zope's lib/python
invoke Python
do "import Zope"
do "app = Zope.app()"
"app" is now the root Zope object.
call methods on app and its subobjects.
Things get a little hoarky when the method depends on an acquired REQUEST
(which isn't available in the environment set up by app = Zope.app()). For
a workaround, see the Core Session Tracking "makerequest.py" script in the
tests directory.
>
> I have a question too:
>
> How do you do the above when your Data.fs is INSTANCE_HOME'd?
I *think* you can just set the INSTANCE_HOME env var? Gad, I'm not sure!
Anybody?