DebugClients/Python3/DebugClientBase.py

changeset 96
9624a110667d
parent 72
015c7e35bd84
child 107
918a6be6f051
diff -r 261bc03812fd -r 9624a110667d DebugClients/Python3/DebugClientBase.py
--- a/DebugClients/Python3/DebugClientBase.py	Sun Jan 31 16:15:16 2010 +0000
+++ b/DebugClients/Python3/DebugClientBase.py	Sun Jan 31 17:11:22 2010 +0000
@@ -16,8 +16,6 @@
 import time
 import imp
 import re
-import distutils.sysconfig
-import imp
 
 
 from DebugProtocol import *
@@ -32,7 +30,7 @@
 
 ################################################################################
 
-def DebugClientInput(prompt = ""):
+def DebugClientInput(prompt = "", echo = True):
     """
     Replacement for the standard input builtin.
     
@@ -43,7 +41,7 @@
     if DebugClientInstance is None or not DebugClientInstance.redirect:
         return DebugClientOrigInput(prompt)
 
-    return DebugClientInstance.input(prompt)
+    return DebugClientInstance.input(prompt, echo)
 
 # Use our own input().
 try:
@@ -285,14 +283,15 @@
         
         self.write("{0}{1!r}\n".format(ResponseThreadList, (currentId, threadList)))
     
-    def input(self, prompt):
+    def input(self, prompt, echo = True):
         """
         Public method to implement input() using the event loop.
         
         @param prompt the prompt to be shown (string)
+        @param echo Flag indicating echoing of the input (boolean)
         @return the entered string
         """
-        self.write("{0}{1!r}\n".format(ResponseRaw, (prompt, 1)))
+        self.write("{0}{1!r}\n".format(ResponseRaw, (prompt, echo)))
         self.inRawMode = True
         self.eventLoop(True)
         return self.rawLine

eric ide

mercurial