Closed icemac closed 6 years ago
@icemac I wonder wether p.r.zope2instance
is the right place to address this. I could e.g. think of a --run-script
option in Zope2.Startup.serve.py
.
But to answer your question, I don't know how to currently do this.
@tschorr wrote:
But to answer your question, I don't know how to currently do this.
What a pity. Let's look together into this issue at the Saltlabs Sprint in Halle.
@icemac I have added two new parts to wsgi.cfg
in the 5.2 branch of buildout.coredev:
bin/wsgirun
to run scripts (ex: bin/wsgirun test_script.py foo bar baz
)app
bound to Zope.app()How about calling them zoperun/zopedebug or zrun/zdebug instead of wsgirun/wsgidebug? And maybe they would be useful in Zope itself instead of in Plone's buildout?
@tschorr your are a good starting point. Like @davisagli I'd prefer to have the code inside Zope, preferably inside a module to make it readable. I'd love it that if the scripts could created by bin/mkwsgiinstance
or if the script created by bin/mkwsgiinstance
gets the ability to run scripts or drop into the python console (aka debug.)
Fixed in zopefoundation/Zope#337.
In older versions (ZServer flavour) it was possible to call run scripts like this:
The same call on version 5.0 (WSGI flavour) breaks because the first argument must be the config file and the following arguments have to include an equal sign.
Is there currently a way to call such run scripts?