From 1a8bd9750d7023b32b647677874211b38a3772f6 Mon Sep 17 00:00:00 2001 From: Jeff Quast Date: Tue, 15 Sep 2015 17:26:50 -0700 Subject: Allow {p}.interact(escape_character=None) For those who wish to disable the ability to escape using process (likely, human) input until normal process termination, they may now set the value of escape_character to None. Some of the related docstring on escape_character was made more brief and clear about its behaviour. --- tests/interact.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'tests/interact.py') diff --git a/tests/interact.py b/tests/interact.py index 9f8e672..93b9bea 100755 --- a/tests/interact.py +++ b/tests/interact.py @@ -33,7 +33,10 @@ import sys def main(): p = pexpect.spawn(sys.executable + ' echo_w_prompt.py', env=no_coverage_env()) - p.interact() + escape_character = chr(29) # default matches api + if len(sys.argv) > 2 and sys.argv[1] == '--no-escape': + escape_character = None + p.interact(escape_character=escape_character) print("Escaped interact") if __name__ == '__main__': -- cgit v1.2.1