[Zodb-checkins] SVN: zdaemon/trunk/ use a computed default prompt,
so the prompt reflects the name of the script
Fred L. Drake, Jr.
fdrake at gmail.com
Thu Aug 5 11:19:53 EDT 2004
Log message for revision 26911:
use a computed default prompt, so the prompt reflects the name of the script
Changed:
U zdaemon/trunk/component.xml
U zdaemon/trunk/zdctl.py
-=-
Modified: zdaemon/trunk/component.xml
===================================================================
--- zdaemon/trunk/component.xml 2004-08-05 12:03:51 UTC (rev 26910)
+++ zdaemon/trunk/component.xml 2004-08-05 15:19:53 UTC (rev 26911)
@@ -251,9 +251,10 @@
</key>
<key name="prompt" datatype="string"
- required="no" default="zdctl>">
+ required="no">
<description>
- The prompt shown by the controller program.
+ The prompt shown by the controller program. The default must
+ be provided by the application.
</description>
</key>
Modified: zdaemon/trunk/zdctl.py
===================================================================
--- zdaemon/trunk/zdctl.py 2004-08-05 12:03:51 UTC (rev 26910)
+++ zdaemon/trunk/zdctl.py 2004-08-05 15:19:53 UTC (rev 26911)
@@ -84,7 +84,11 @@
self.add("logfile", "runner.logfile", "l:", "logfile=")
self.add("python", "runner.python")
self.add("zdrun", "runner.zdrun")
- self.add("prompt", "runner.prompt", default="zdctl>")
+ programname = sys.argv[0]
+ base, ext = os.path.splitext(programname)
+ if ext == ".py":
+ programname = base
+ self.add("prompt", "runner.prompt", default=(programname + ">"))
def realize(self, *args, **kwds):
RunnerOptions.realize(self, *args, **kwds)
More information about the Zodb-checkins
mailing list