[Zope3-checkins] SVN: Zope3/trunk/src/zope/app/twisted/controller.py cross-port the 'run' command from zope.app.server.controller

Zachery Bir zbir at urbanape.com
Fri Dec 23 11:14:34 EST 2005


Log message for revision 40993:
  cross-port the 'run' command from zope.app.server.controller
  

Changed:
  U   Zope3/trunk/src/zope/app/twisted/controller.py

-=-
Modified: Zope3/trunk/src/zope/app/twisted/controller.py
===================================================================
--- Zope3/trunk/src/zope/app/twisted/controller.py	2005-12-23 00:57:03 UTC (rev 40992)
+++ Zope3/trunk/src/zope/app/twisted/controller.py	2005-12-23 16:14:33 UTC (rev 40993)
@@ -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