[Zope-dev] Extending Zope2 bin/instance run

Hanno Schlichting hanno at hannosch.eu
Fri Sep 3 04:27:39 EDT 2010


On Fri, Sep 3, 2010 at 9:50 AM, Wichert Akkerman <wichert at wiggy.net> wrote:
> I have noticed that now that we are almost exclusively using eggs to
> distribute our software using "bin/instance run" has become difficult: often
> the script you want to run is located inside an egg which makes to path to
> it hard to predict. This is not the most user friendly command:
>
>  bin/instance run eggs/my.package-*/my/package/script.py

You could also expose your script as a console_script and thus get it into bin/.

> I am considering to modify bin/instance run to check if its first argument
> is a filesystem path, and if not consider the argument to be a dotted name
> of a callable which should be invoke. That way backwards compatibility
> remains, but you can now also do this:
>
>  bin/instance run my.package.script.main

I don't see any reason why we shouldn't do this.

> I am not sure if this is best done in plone.recipe.zope2instance or
> Zope2.Startup.zopectl. They have differing versions of ZopeCmd. Perhaps the
> plone.recipe.zope2instance code should be merged into Zope2's original as
> well?

The code in the zope2instance recipe has diverged both in
implementation and semantics from the original Zope2 code. I tried to
push back some of that in 2.11 while porting the Windows service
support code over. But there's again a lot of other changes.

Given that this code is completely untested except for people actually
using it on different platforms I'm not personally going to merge the
codebase any further. But anyone else is free to do so given they test
the modified code under all supported platforms and especially
Windows.

Hanno


More information about the Zope-Dev mailing list