Skip to content

Commit

Permalink
Another python 2 fix and add docs
Browse files Browse the repository at this point in the history
  • Loading branch information
blink1073 committed Dec 20, 2016
1 parent 4cc4cbc commit 8200a5d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions metakernel/pexpect.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@
def spawn(command, args=[], timeout=30, maxread=2000,
searchwindowsize=None, logfile=None, cwd=None, env=None,
ignore_sighup=True, echo=True, encoding='utf-8', **kwargs):
'''This is the main entry point for Pexpect. Use this functio to start
and control child applications.
See https://github.com/pexpect/pexpect/blob/master/pexpect/pty_spawn.py
for more information.
'''
codec_errors = kwargs.get('codec_errors', kwargs.get('errors', 'strict'))
if pty is None:
if args:
Expand Down
2 changes: 1 addition & 1 deletion metakernel/tests/test_expect.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def test_expect_exact (self):
).replace('\r', '\n').replace('\n\n', '\n').rstrip()
assert the_old_way == the_new_way, hex_diff(the_old_way, the_new_way)
p = pexpect.spawn('echo hello.?world')
i = p.expect_exact('.?')
i = p.expect_exact(u'.?')
self.assertEqual(p.before, 'hello')
self.assertEqual(p.after, '.?')

Expand Down

0 comments on commit 8200a5d

Please sign in to comment.