[Grok-dev] howto run python scripts with grok application

Jan-Wijbrand Kolman janwijbrand at gmail.com
Sat Jan 2 10:34:06 EST 2010


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...

When doing...

  $ ./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?

regards,
jw




More information about the Grok-dev mailing list