diff options
author | Thomas Kluyver <takowl@gmail.com> | 2016-12-06 15:06:07 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-06 15:06:07 +0100 |
commit | 1a2b41f1cbdf9b2a3b06223177e9801bab93306c (patch) | |
tree | da1c549703b8d30a645f2125b4d981b9efbe0618 | |
parent | 29d97fc4b49aba0d772f067b7b453a220f52db0b (diff) | |
parent | fb09a5a0c6b4c599b9e364c001f6f26bd2936a14 (diff) | |
download | pexpect-git-1a2b41f1cbdf9b2a3b06223177e9801bab93306c.tar.gz |
Merge pull request #395 from AngusP/patch-1
(minor) Remove spawnu in spawn docstring in favour of spawn with encoding arg
-rw-r--r-- | pexpect/pty_spawn.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/pexpect/pty_spawn.py b/pexpect/pty_spawn.py index d1c6df7..ded9e20 100644 --- a/pexpect/pty_spawn.py +++ b/pexpect/pty_spawn.py @@ -106,8 +106,9 @@ class spawn(SpawnBase): child = pexpect.spawn('some_command') child.logfile = sys.stdout - # In Python 3, spawnu should be used to give str to stdout: - child = pexpect.spawnu('some_command') + # In Python 3, spawn with the argument ``encoding`` should be used to ensure utf-8 + encoded data is sent to stdout: + child = pexpect.spawn('some_command', encoding='utf-8') child.logfile = sys.stdout The logfile_read and logfile_send members can be used to separately log |