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
This commit is contained in:
Greg Clayton 2014-09-15 22:46:25 +00:00
parent ba656e1d7c
commit 48e17578ed
1 changed files with 1 additions and 1 deletions

View File

@ -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.