Author: jdevlieghere
Date: Tue Jun 25 10:27:38 2019
New Revision: 364335

URL: http://llvm.org/viewvc/llvm-project?rev=364335&view=rev
Log:
[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.

Modified:
    lldb/trunk/source/Interpreter/embedded_interpreter.py

Modified: lldb/trunk/source/Interpreter/embedded_interpreter.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/embedded_interpreter.py?rev=364335&r1=364334&r2=364335&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/embedded_interpreter.py (original)
+++ lldb/trunk/source/Interpreter/embedded_interpreter.py Tue Jun 25 10:27:38 
2019
@@ -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()
 
 


_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to