Whatever happened to the ZOPE_CONFIG env idea? What I have found is
that I started putting
Zope.config(os.getenv(ZOPE_CONFIG))
in all my scripts. Why can't his happen within Zope.app()? Something
like this.
*** lib/python/Zope/__init__.py.orig 2003-12-21 19:24:25.0
-0500
---
Nothing happened with it because by the time I got around to putting it
in, the 2.7 branch was frozen for changes.
Not sure about your patch, as Zope.app() can be called outside of the
context of a script. Also, if the configuration has already been
performed before the call to Zope.app(), it
I do this dance a lot and this sounds fine to me. I tried using
zopectl run with my scripts but you couldn't pass parameters to the
script (which lowered the usefulness for me).
-EAD
On Dec 21, 2003, at 6:16 PM, Chris McDonough wrote:
The extant import Zope; app = Zope.app() dance to get a
Chris McDonough wrote at 2003-12-21 18:16 -0500:
...
Will need to do this under 2.7b4+:
import Zope
Zope.configure('/path/to/configfile')
app = Zope.app()
...
Jim Roepke suggested that if an ZOPE_CONFIG envvar was set with the
config file path, that import Zope; Zope.app() could be made to
The extant import Zope; app = Zope.app() dance to get a hold of the
Zope root object stopped working long ago on the 2.7 branch and HEAD due
to the new configuration machinery, which implies that users be explicit
about configuration settings rather than allowing Zope to guess.
Up til now, the
Chris McDonough wrote
Code which used to do:
import Zope
app = Zope.app()
Will need to do this under 2.7b4+:
import Zope
Zope.configure('/path/to/configfile')
app = Zope.app()
Can we get an exception in the first case that states something like
No config file, use
On Sun, 2003-12-21 at 19:43, Anthony Baxter wrote:
Can we get an exception in the first case that states something like
No config file, use Zope.configure('configfile')?
I think that can be arranged. Or something that smells like it
anyway...
___