[ZCM] Re: [ZC] 1233/ 5 Comment "ZOPE_CONFIG environment var for
app=Zope.app()"
Erik A.Dahl
edahl at confmon.com
Thu May 13 13:37:50 EDT 2004
I think it is important that the ZOPE_CONFIG variable exist. I have
10s of scripts that manipulate my zope database. Having to specify the
zope.conf file to run them is a bit of a pain. Plus, I do interactive
sessions with zope from the python command line a lot. Having this
work without dealing with the config file is quite useful. Does
honoring this variable hurt anything?
-EAD
On May 13, 2004, at 1:23 PM, Collector: Zope Bugs, Features, and
Patches ... wrote:
> Issue #1233 Update (Comment) "ZOPE_CONFIG environment var for
> app=Zope.app()"
> Status Accepted, Zope/feature+solution medium
> To followup, visit:
> http://zope.org/Collectors/Zope/1233
>
> ==============================================================
> = Comment - Entry #5 by shh on May 13, 2004 1:23 pm
>
> In fact, yes.
>
> The patch is in the wrong place. *If* the ZOPE_CONFIG variable should
> be honored, the logic would belong into App.config.getConfiguration().
>
> However, I do not like the idea very much. I'd rather see testrunners
> load configuration files which would allow for a more finegrained
> control of the realized configuration.
>
> I have a testrunner.py that supports a '-C configfile' option here:
> http://zope.org/Members/shh/TestRunner
>
> A similar patch for test.py (of Zope 2.7) is here:
> http://zope.org/Collectors/Zope/1279
>
> An already patched test.py is here:
> http://zope.org/Members/shh/TestRunner/test.py
>
> ________________________________________
> = Assign - Entry #4 by ajung on May 13, 2004 9:40 am
>
> Status: Pending => Accepted
>
> Supporters added: ajung
>
> Any objections including this patch for 2.7.1?
> ________________________________________
> = Comment - Entry #3 by lslatr on Feb 17, 2004 11:00 am
>
> I just realized that I snuck in (by accedent) a change to _setConfig
> that keeps ZopeOptions from parsing sys.argv if the configfile has
> been specified. This is a good thing as far as scripts go and I don't
> _think_ it effects anything else can someone else confirm? It's line
> Zope/Startup/run.py:46 after patching.
> ________________________________________
> = Comment - Entry #2 by chrisw on Feb 17, 2004 10:47 am
>
> I really like this. What needs to happen to get this into the next 2.7
> release?
> ________________________________________
> = Request - Entry #1 by lslatr on Feb 16, 2004 6:06 pm
>
>
> Uploaded: "ZOPE_CONFIG.patch"
> - http://zope.org/Collectors/Zope/1233/ZOPE_CONFIG.patch/view
> Allow scripts to use the same import Zope; app=Zope.app() dance that
> they used in 2.6. The zope config file is found using the environment
> var ZOPE_CONFIG.
> ==============================================================
More information about the Zope-Collector-Monitor
mailing list