A container for information about the result of a command execution. All params are exposed as attributes of the same name and type. :param str stdout: The subprocess' standard output. :param str stderr: Same as ``stdout`` but containing standard error (unless the
| 1432 | |
| 1433 | |
| 1434 | class Result: |
| 1435 | """ |
| 1436 | A container for information about the result of a command execution. |
| 1437 | |
| 1438 | All params are exposed as attributes of the same name and type. |
| 1439 | |
| 1440 | :param str stdout: |
| 1441 | The subprocess' standard output. |
| 1442 | |
| 1443 | :param str stderr: |
| 1444 | Same as ``stdout`` but containing standard error (unless the process |
| 1445 | was invoked via a pty, in which case it will be empty; see |
| 1446 | `.Runner.run`.) |
| 1447 | |
| 1448 | :param str encoding: |
| 1449 | The string encoding used by the local shell environment. |
| 1450 | |
| 1451 | :param str command: |
| 1452 | The command which was executed. |
| 1453 | |
| 1454 | :param str shell: |
| 1455 | The shell binary used for execution. |
| 1456 | |
| 1457 | :param dict env: |
| 1458 | The shell environment used for execution. (Default is the empty dict, |
| 1459 | ``{}``, not ``None`` as displayed in the signature.) |
| 1460 | |
| 1461 | :param int exited: |
| 1462 | An integer representing the subprocess' exit/return code. |
| 1463 | |
| 1464 | .. note:: |
| 1465 | This may be ``None`` in situations where the subprocess did not run |
| 1466 | to completion, such as when auto-responding failed or a timeout was |
| 1467 | reached. |
| 1468 | |
| 1469 | :param bool pty: |
| 1470 | A boolean describing whether the subprocess was invoked with a pty or |
| 1471 | not; see `.Runner.run`. |
| 1472 | |
| 1473 | :param tuple hide: |
| 1474 | A tuple of stream names (none, one or both of ``('stdout', 'stderr')``) |
| 1475 | which were hidden from the user when the generating command executed; |
| 1476 | this is a normalized value derived from the ``hide`` parameter of |
| 1477 | `.Runner.run`. |
| 1478 | |
| 1479 | For example, ``run('command', hide='stdout')`` will yield a `Result` |
| 1480 | where ``result.hide == ('stdout',)``; ``hide=True`` or ``hide='both'`` |
| 1481 | results in ``result.hide == ('stdout', 'stderr')``; and ``hide=False`` |
| 1482 | (the default) generates ``result.hide == ()`` (the empty tuple.) |
| 1483 | |
| 1484 | :param int pid: |
| 1485 | The process ID of the subprocess that was executed (normally) or is |
| 1486 | executing (when asynchronous or disowned). |
| 1487 | |
| 1488 | .. versionadded:: 3.0 |
| 1489 | |
| 1490 | :param bool disowned: |
| 1491 | Whether the subprocess was 'disowned' or detached from ourselves; in |
no outgoing calls
no test coverage detected
searching dependent graphs…