[tor-commits] [arm/master] Providing a startup message for interpretor prompt

atagar at torproject.org atagar at torproject.org
Tue Aug 30 16:59:17 UTC 2011


commit ad5afa2a945a36a6b1b04e78a91e83876a77301a
Author: Damian Johnson <atagar at torproject.org>
Date:   Tue Aug 30 09:57:31 2011 -0700

    Providing a startup message for interpretor prompt
    
    Simple message giving arm's version and mentoining the /help and /quit options.
---
 src/util/torInterpretor.py |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/src/util/torInterpretor.py b/src/util/torInterpretor.py
index d73e84f..266e9e4 100644
--- a/src/util/torInterpretor.py
+++ b/src/util/torInterpretor.py
@@ -6,8 +6,14 @@ directly, history and tab completion.
 
 import readline # simply importing this provides history to raw_input
 
+import version
+
 from util import enum, torTools
 
+INIT_MSG = """Arm %s Control Interpretor
+Enter \"/help\" for usage information and \"/quit\" to stop.
+""" % version.VERSION
+
 TERM_COLORS = ("BLACK", "RED", "GREEN", "YELLOW", "BLUE", "MAGENTA", "CYAN", "WHITE")
 
 Color = enum.Enum(*TERM_COLORS)
@@ -319,6 +325,8 @@ def prompt():
   readline.set_completer_delims("\n")
   interpretor = ControlInterpretor()
   
+  print INIT_MSG
+  
   while True:
     try:
       input = raw_input(prompt)



More information about the tor-commits mailing list