@@ -1050,10 +1050,12 @@ handling consistency are valid for these functions.
10501050
10511051 Return ``(status, output) `` of executing *cmd * in a shell.
10521052
1053- Execute the string *cmd * in a shell with :func: `os.popen ` and return a 2-tuple
1054- ``(status, output) ``. *cmd * is actually run as ``{ cmd ; } 2>&1 ``, so that the
1055- returned output will contain output or error messages. A trailing newline is
1056- stripped from the output. The exit status for the command can be interpreted
1053+ Execute the string *cmd * in a shell with :class: `Popen ` and return a 2-tuple
1054+ ``(status, output) `` via :func: `Popen.communicate `. Universal newlines mode
1055+ is used; see the notes on :ref: `frequently-used-arguments ` for more details.
1056+
1057+ A trailing newline is stripped from the output.
1058+ The exit status for the command can be interpreted
10571059 according to the rules for the C function :c:func: `wait `. Example::
10581060
10591061 >>> subprocess.getstatusoutput('ls /bin/ls')
@@ -1063,7 +1065,8 @@ handling consistency are valid for these functions.
10631065 >>> subprocess.getstatusoutput('/bin/junk')
10641066 (256, 'sh: /bin/junk: not found')
10651067
1066- Availability: UNIX.
1068+ .. versionchanged :: 3.3
1069+ Availability: Unix & Windows
10671070
10681071
10691072.. function :: getoutput(cmd)
@@ -1076,7 +1079,8 @@ handling consistency are valid for these functions.
10761079 >>> subprocess.getoutput('ls /bin/ls')
10771080 '/bin/ls'
10781081
1079- Availability: UNIX.
1082+ .. versionchanged :: 3.3
1083+ Availability: Unix & Windows
10801084
10811085
10821086Notes
0 commit comments