diff options
| author | Greg Clayton <gclayton@apple.com> | 2014-09-15 22:46:25 +0000 |
|---|---|---|
| committer | Greg Clayton <gclayton@apple.com> | 2014-09-15 22:46:25 +0000 |
| commit | 48e17578ed12bbb76c00ca5064f244ad97e0d423 (patch) | |
| tree | 98215f7de62d6578bd8cbfa1f6b774b314ddb1c6 | |
| parent | ba656e1d7c7f8d6ad6ecd6bf526b09771d3b7e9a (diff) | |
| download | bcm5719-llvm-48e17578ed12bbb76c00ca5064f244ad97e0d423.tar.gz bcm5719-llvm-48e17578ed12bbb76c00ca5064f244ad97e0d423.zip | |
Continuation broken for Python scripts when using non-interactive input (Xcode for example).
The problem was the read_func we were supplying to the interactive interpreter wasn't stripping the newline from the end of the string. Now it does and multi-line python scripts can be typed in Xcode.
<rdar://problem/17696438>
llvm-svn: 217843
| -rw-r--r-- | lldb/source/Interpreter/embedded_interpreter.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lldb/source/Interpreter/embedded_interpreter.py b/lldb/source/Interpreter/embedded_interpreter.py index 51a971690d6..10186f5a9d5 100644 --- a/lldb/source/Interpreter/embedded_interpreter.py +++ b/lldb/source/Interpreter/embedded_interpreter.py @@ -61,7 +61,7 @@ def get_terminal_size(fd): def readfunc_stdio(prompt): sys.stdout.write(prompt) - return sys.stdin.readline() + return sys.stdin.readline().rstrip() def run_python_interpreter (local_dict): # Pass in the dictionary, for continuity from one session to the next. |

