[Grok-dev] howto run python scripts with grok application
rlacko at gratex.com
Mon Jan 4 02:50:30 EST 2010
I think i would try to use the solution what Alberto sent me,
I also try to create a bug in Launchpad
From: grok-dev-bounces at zope.org [grok-dev-bounces at zope.org] On Behalf Of Jan-Wijbrand Kolman [janwijbrand at gmail.com]
Sent: Saturday, January 02, 2010 4:34 PM
To: grok-dev at zope.org
Subject: Re: [Grok-dev] howto run python scripts with grok application
Lacko Roman <rlacko at gratex.com> wrote:
>>> Assuming the ./bin/zopectl script is available in your project you can do:
>>> $ ./bin/zopectl run [myscript]
> wel, grokproject (1.0) creates just ./bin/myapp-ctl and ./bin/myapp-debug,
nothing like ./bin/zopectl
> and ./bin/myapp-ctl does not work with run parameter:
> $ ./bin/myapp-ctl run myscript.py
> $ *** Unknown syntax: run
Hmm, I was afraid of that...
$ ./bin/myapp-ctl debug
.you get a "interactive shell"-like environment. I guess you could then import
your migration-script module and call the main function, passing the app object.
It's no pretty, but maybe it'll get you somewhat further.
If you'd like to, could you maybe create an bug report for the missing "script"
command in launchpad?
Grok-dev mailing list
Grok-dev at zope.org
More information about the Grok-dev