summaryrefslogtreecommitdiffstats
path: root/lldb/source/Interpreter/embedded_interpreter.py
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2019-06-25 17:27:38 +0000
committerJonas Devlieghere <jonas@devlieghere.com>2019-06-25 17:27:38 +0000
commit99a44915275f84ceac5583a89b22a066057fd61a (patch)
tree2dc1304871137ba503b7a3824175658dc2a06ff2 /lldb/source/Interpreter/embedded_interpreter.py
parent97017a8ef9c9f0388aea51d368bfb0b360f54704 (diff)
downloadbcm5719-llvm-99a44915275f84ceac5583a89b22a066057fd61a.tar.gz
bcm5719-llvm-99a44915275f84ceac5583a89b22a066057fd61a.zip
[Python] Flush prompt before reading input
Make sure the prompt has been flushed before reading commands. Buffering is different in Python 3, which led to the prompt not being displayed in the Xcode console. llvm-svn: 364335
Diffstat (limited to 'lldb/source/Interpreter/embedded_interpreter.py')
-rw-r--r--lldb/source/Interpreter/embedded_interpreter.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/lldb/source/Interpreter/embedded_interpreter.py b/lldb/source/Interpreter/embedded_interpreter.py
index c103b7e2e1d..8a1195d83c6 100644
--- a/lldb/source/Interpreter/embedded_interpreter.py
+++ b/lldb/source/Interpreter/embedded_interpreter.py
@@ -72,6 +72,7 @@ def get_terminal_size(fd):
def readfunc_stdio(prompt):
sys.stdout.write(prompt)
+ sys.stdout.flush()
return sys.stdin.readline().rstrip()
OpenPOWER on IntegriCloud