diff -r fcfbb9e94471 -r e91462fd0838 eric6/DebugClients/Python/DebugClientBase.py --- a/eric6/DebugClients/Python/DebugClientBase.py Wed Apr 22 19:58:01 2020 +0200 +++ b/eric6/DebugClients/Python/DebugClientBase.py Thu Apr 23 18:50:54 2020 +0200 @@ -44,13 +44,17 @@ def DebugClientRawInput(prompt="", echo=True): """ - Replacement for the standard raw_input builtin. + Replacement for the standard raw_input() builtin (Python 2) and + the standard input() builtin (Python 3). This function works with the split debugger. - @param prompt prompt to be shown. (string) - @param echo flag indicating echoing of the input (boolean) - @return result of the raw_input() call + @param prompt prompt to be shown + @type str + @param echo flag indicating echoing of the input + @type bool + @return result of the raw_input()/input() call + @rtype str """ if DebugClientInstance is None or not DebugClientInstance.redirect: return DebugClientOrigRawInput(prompt) @@ -58,20 +62,21 @@ return DebugClientInstance.raw_input(prompt, echo) -def DebugClientInput(prompt="", echo=True): +def DebugClientInput(prompt=""): """ - Replacement for the standard input builtin. + Replacement for the standard input() builtin (Python 2). This function works with the split debugger. - @param prompt prompt to be shown (string) - @param echo flag indicating to echo the output (boolean) + @param prompt prompt to be shown + @type str @return result of the input() call + @rtype str """ if DebugClientInstance is None or not DebugClientInstance.redirect: return DebugClientOrigInput(prompt) - return DebugClientInstance.input(prompt, echo) + return DebugClientInstance.input(prompt) # Use our own input() and on Python 2 raw_input(). if sys.version_info[0] == 2: @@ -93,11 +98,11 @@ else: try: DebugClientOrigInput = __builtins__.__dict__['input'] - __builtins__.__dict__['input'] = DebugClientInput + __builtins__.__dict__['input'] = DebugClientRawInput except (AttributeError, KeyError): import __main__ DebugClientOrigInput = __main__.__builtins__.__dict__['input'] - __main__.__builtins__.__dict__['input'] = DebugClientInput + __main__.__builtins__.__dict__['input'] = DebugClientRawInput ###############################################################################