diff options
Diffstat (limited to 'lldb/source/Interpreter/embedded_interpreter.py')
| -rw-r--r-- | lldb/source/Interpreter/embedded_interpreter.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lldb/source/Interpreter/embedded_interpreter.py b/lldb/source/Interpreter/embedded_interpreter.py index 5492833..0e57c1e 100644 --- a/lldb/source/Interpreter/embedded_interpreter.py +++ b/lldb/source/Interpreter/embedded_interpreter.py @@ -84,7 +84,20 @@ class SimpleREPL(code.InteractiveConsole): if not more: break + def one_line (self, input): + line = self.process_input (input) + more = self.push(line) + if more: + self.write ("Input not a complete line.") + self.resetbuffer() + more = 0 + def run_python_interpreter (dict): # Pass in the dictionary, for continuity from one session to the next. repl = SimpleREPL('>>> ', dict) repl.interact() + +def run_one_line (dict, input_string): + repl = SimpleREPL ('', dict) + repl.one_line (input_string) + |
