[Zope3-checkins] SVN: Zope3/trunk/src/zope/app/server/controller.py
Expose a new 'run' command for zopectl that works like Zope 2's
Zachery Bir
zbir at urbanape.com
Wed Dec 7 10:38:57 EST 2005
Log message for revision 40622:
Expose a new 'run' command for zopectl that works like Zope 2's
zopectl, except that it offers 'root' rather than 'app' as the root
container object in locals()
Changed:
U Zope3/trunk/src/zope/app/server/controller.py
-=-
Modified: Zope3/trunk/src/zope/app/server/controller.py
===================================================================
--- Zope3/trunk/src/zope/app/server/controller.py 2005-12-07 15:37:56 UTC (rev 40621)
+++ Zope3/trunk/src/zope/app/server/controller.py 2005-12-07 15:38:56 UTC (rev 40622)
@@ -33,6 +33,15 @@
print "debug -- Initialize the Zope application, providing a"
print " debugger object at an interactive Python prompt."
+ def do_run(self, arg):
+ cmdline = "%s/bin/scriptzope %s" % (INSTANCE_HOME, arg)
+ os.system(cmdline)
+ def help_run(self):
+ print "run <script> [args] -- run a Python script with the Zope "
+ print " environment set up. The script has "
+ print " 'root' exposed as the root container."
+
+
def main(args=None, options=None, cmdclass=ZopectlCmd):
zdaemon.zdctl.main(args, options, cmdclass)
More information about the Zope3-Checkins
mailing list