@@ -3916,12 +3916,13 @@ written in Python, such as a mail server's external command delivery program.
39163916 .. availability :: Unix.
39173917
39183918
3919- .. function :: popen(cmd, mode='r', buffering=-1)
3919+ .. function :: popen(cmd, mode='r', buffering=-1, encoding=None )
39203920
39213921 Open a pipe to or from command *cmd *.
39223922 The return value is an open file object
39233923 connected to the pipe, which can be read or written depending on whether *mode *
3924- is ``'r' `` (default) or ``'w' ``. The *buffering * argument has the same meaning as
3924+ is ``'r' `` (default) or ``'w' ``.
3925+ The *buffering * and *encoding * arguments have the same meaning as
39253926 the corresponding argument to the built-in :func: `open ` function. The
39263927 returned file object reads or writes text strings rather than bytes.
39273928
@@ -3944,6 +3945,9 @@ written in Python, such as a mail server's external command delivery program.
39443945 documentation for more powerful ways to manage and communicate with
39453946 subprocesses.
39463947
3948+ .. versionchanged :: 3.11
3949+ Added the *encoding * parameter.
3950+
39473951
39483952.. function :: posix_spawn(path, argv, env, *, file_actions=None, \
39493953 setpgroup=None, resetids=False, setsid=False, setsigmask=(), \
0 commit comments