Files
ServerSync/lib/invoke/__pycache__/runners.cpython-314.pyc

925 lines
69 KiB
Plaintext
Raw Normal View History

2026-02-12 02:28:23 +02:00
+
t<10>i<EFBFBD><69><00><00><><00>^RIt^RIt^RIt^RIt^RIt^RIt^RIt^RIt^RIH t H
t
^RI H t ^RI HtHtHtHtHtHtHtHtHtHt^RIt^RIt^RIt^RIHtHtHtH t H!t!H"t"^RI#H$t$H%t%H&t&H't'H(t(^RI)H*t*H+t+H,t,]'d ^RI-H.t.^R I/H0t0!R
R 4t1!R R ]14t2!RR4t3!RR]34t4RRRllt5RRlt6R# ]dRtL<>i;i ]dRtL<>i;i ]dRtL<>i;i)<17>N)<02>Popen<65>PIPE)<01> TracebackType)
<EFBFBD> TYPE_CHECKING<4E>Any<6E>Callable<6C>Dict<63> Generator<6F>IO<49>List<73>Optional<61>Tuple<6C>Type)<06>UnexpectedExit<69>Failure<72>ThreadException<6F> WatcherError<6F>SubprocessPipeError<6F>CommandTimedOut)<05>WINDOWS<57>pty_size<7A>character_buffered<65>ready_for_reading<6E> bytes_to_read)<03>
has_fileno<EFBFBD>isatty<74>ExceptionHandlingThread)<01>Context)<01> StreamWatcherc<00>*a<00>]tRt^=toRtRtRtV3RlRltV3RlRltV3RlR lt V3R
lR lt
V3R lR lt V3RlRlt V3RlRlt V3RlRltV3RlRltV3RlRltV3RlRltV3RlRltV3RlRltV3RlRltV3R lR!ltV3R"lR#ltV3R$lR%ltV3R&lR'ltRWV3R(lR)lltV3R*lR+ltV3R,lR-ltV3R.lR/ltV3R0lR1lt]V3R2lR3l4tV3R4lR5lt V3R6lR7lt!V3R8lR9lt"]V3R:lR;l4t#V3R<lR=lt$V3R>lR?lt%V3R@lRAlt&V3RBlRClt'V3RDlRElt(V3RFlRGlt)V3RHlRIlt*V3RJlRKlt+V3RLlRMlt,V3RNlROlt-V3RPlRQlt.]V3RRlRSl4t/V3RTlt0RUt1Vt2RV#)X<>Runnera
Partially-abstract core command-running API.
This class is not usable by itself and must be subclassed, implementing a
number of methods such as `start`, `wait` and `returncode`. For a subclass
implementation example, see the source code for `.Local`.
.. versionadded:: 1.0
i<EFBFBD>g{<14>G<EFBFBD>z<EFBFBD>?c<00>"<<01>V^8<>dQhRRRR/#<00><05><00>contextr<00>returnN<6E>)<02>format<61> __classdict__s"<22><>5/tmp/pip-target-zhdecbcm/lib/python/invoke/runners.py<70> __annotate__<5F>Runner.__annotate__Ms<00><><00>.<1F>.<1F> <09>.<1F>d<EFBFBD>.<1F>c <0C><><00>Wn\P!4VnVPP
VnVPP VnRVn.VnRVn RVn
RVn R#)a<>
Create a new runner with a handle on some `.Context`.
:param context:
a `.Context` instance, used to transmit default options and provide
access to other contextualized information (e.g. a remote-oriented
`.Runner` might want a `.Context` subclass holding info about
hostnames and ports.)
.. note::
The `.Context` given to `.Runner` instances **must** contain
default config values for the `.Runner` class in question. At a
minimum, this means values for each of the default
`.Runner.run` keyword arguments such as ``echo`` and ``warn``.
:raises exceptions.ValueError:
if not all expected default values are found in ``context``.
FN) r%<00> threading<6E>Event<6E>program_finished<65> __class__<5F>read_chunk_size<7A> input_sleep<65>warned_about_pty_fallback<63>watchers<72>_timer<65> _asynchronous<75> _disowned)<02>selfr%s&&r*<00>__init__<5F>Runner.__init__Msk<00><00>(<1F> <0C>
!*<2A><0F><0F> 1<><04><1D> $<24>~<7E>~<7E>=<3D>=<3D><04><1C> <20>><3E>><3E>5<>5<><04><18>).<2E><04>&<26>02<30><04> <0A>15<31><04> <0B>#<23><04><1A><1E><04>r-c<00>:<<01>V^8<>dQhRS[RS[RS[R,/#<00>r$<00>command<6E>kwargsr&<00>Result<6C><03>strrr )r(r)s"<22>r*r+r,}s,<00><><00>Q<1C>Q<1C>3<EFBFBD>Q<1C>#<23>Q<1C>(<28>8<EFBFBD>2D<32>Qr-c <0C> <00>VP!V3/VBVP'g%VP'gVP4### TP'g%TP'gTP4iii;i)a<>)
Execute ``command``, returning an instance of `Result` once complete.
By default, this method is synchronous (it only returns once the
subprocess has completed), and allows interactive keyboard
communication with the subprocess.
It can instead behave asynchronously (returning early & requiring
interaction with the resulting object to manage subprocess lifecycle)
if you specify ``asynchronous=True``. Furthermore, you can completely
disassociate the subprocess from Invoke's control (allowing it to
persist on its own after Python exits) by saying ``disown=True``. See
the per-kwarg docs below for details on both of these.
.. note::
All kwargs will default to the values found in this instance's
`~.Runner.context` attribute, specifically in its configuration's
``run`` subtree (e.g. ``run.echo`` provides the default value for
the ``echo`` keyword, etc). The base default values are described
in the parameter list below.
:param str command: The shell command to execute.
:param bool asynchronous:
When set to ``True`` (default ``False``), enables asynchronous
behavior, as follows:
- Connections to the controlling terminal are disabled, meaning you
will not see the subprocess output and it will not respond to
your keyboard input - similar to ``hide=True`` and
``in_stream=False`` (though explicitly given
``(out|err|in)_stream`` file-like objects will still be honored
as normal).
- `.run` returns immediately after starting the subprocess, and its
return value becomes an instance of `Promise` instead of
`Result`.
- `Promise` objects are primarily useful for their `~Promise.join`
method, which blocks until the subprocess exits (similar to
threading APIs) and either returns a final `~Result` or raises an
exception, just as a synchronous ``run`` would.
- As with threading and similar APIs, users of
``asynchronous=True`` should make sure to ``join`` their
`Promise` objects to prevent issues with interpreter
shutdown.
- One easy way to handle such cleanup is to use the `Promise`
as a context manager - it will automatically ``join`` at the
exit of the context block.
.. versionadded:: 1.4
:param bool disown:
When set to ``True`` (default ``False``), returns immediately like
``asynchronous=True``, but does not perform any background work
related to that subprocess (it is completely ignored). This allows
subprocesses using shell backgrounding or similar techniques (e.g.
trailing ``&``, ``nohup``) to persist beyond the lifetime of the
Python process running Invoke.
.. note::
If you're unsure whether you want this or ``asynchronous``, you
probably want ``asynchronous``!
Specifically, ``disown=True`` has the following behaviors:
- The return value is ``None`` instead of a `Result` or subclass.
- No I/O worker threads are spun up, so you will have no access to
the subprocess' stdout/stderr, your stdin will not be forwarded,
``(out|err|in)_stream`` will be ignored, and features like
``watchers`` will not function.
- No exit code is checked for, so you will not receive any errors
if the subprocess fails to exit cleanly.
- ``pty=True`` may not function correctly (subprocesses may not run
at all; this seems to be a potential bug in Python's
``pty.fork``) unless your command line includes tools such as
``nohup`` or (the shell builtin) ``disown``.
.. versionadded:: 1.4
:param bool dry:
Whether to dry-run instead of truly invoking the given command. See
:option:`--dry` (which flips this on globally) for details on this
behavior.
.. versionadded:: 1.3
:param bool echo:
Controls whether `.run` prints the command string to local stdout
prior to executing it. Default: ``False``.
.. note::
``hide=True`` will override ``echo=True`` if both are given.
:param echo_format:
A string, which when passed to Python's inbuilt ``.format`` method,
will change the format of the output when ``run.echo`` is set to
true.
Currently, only ``{command}`` is supported as a parameter.
Defaults to printing the full command string in ANSI-escaped bold.
:param bool echo_stdin:
Whether to write data from ``in_stream`` back to ``out_stream``.
In other words, in normal interactive usage, this parameter
controls whether Invoke mirrors what you type back to your
terminal.
By default (when ``None``), this behavior is triggered by the
following:
* Not using a pty to run the subcommand (i.e. ``pty=False``),
as ptys natively echo stdin to stdout on their own;
* And when the controlling terminal of Invoke itself (as per
``in_stream``) appears to be a valid terminal device or TTY.
(Specifically, when `~invoke.util.isatty` yields a ``True``
result when given ``in_stream``.)
.. note::
This property tends to be ``False`` when piping another
program's output into an Invoke session, or when running
Invoke within another program (e.g. running Invoke from
itself).
If both of those properties are true, echoing will occur; if either
is false, no echoing will be performed.
When not ``None``, this parameter will override that auto-detection
and force, or disable, echoing.
:param str encoding:
Override auto-detection of which encoding the subprocess is using
for its stdout/stderr streams (which defaults to the return value
of `default_encoding`).
:param err_stream:
Same as ``out_stream``, except for standard error, and defaulting
to ``sys.stderr``.
:param dict env:
By default, subprocesses receive a copy of Invoke's own environment
(i.e. ``os.environ``). Supply a dict here to update that child
environment.
For example, ``run('command', env={'PYTHONPATH':
'/some/virtual/env/maybe'})`` would modify the ``PYTHONPATH`` env
var, with the rest of the child's env looking identical to the
parent.
.. seealso:: ``replace_env`` for changing 'update' to 'replace'.
:param bool fallback:
Controls auto-fallback behavior re: problems offering a pty when
``pty=True``. Whether this has any effect depends on the specific
`Runner` subclass being invoked. Default: ``True``.
:param hide:
Allows the caller to disable ``run``'s default behavior of copying
the subprocess' stdout and stderr to the controlling terminal.
Specify ``hide='out'`` (or ``'stdout'``) to hide only the stdout
stream, ``hide='err'`` (or ``'stderr'``) to hide only stderr, or
``hide='both'`` (or ``True``) to hide both streams.
The default value is ``None``, meaning to print everything;
``False`` will also disable hiding.
.. note::
Stdout and stderr are always captured and stored in the
``Result`` object, regardless of ``hide``'s value.
.. note::
``hide=True`` will also override ``echo=True`` if both are
given (either as kwargs or via config/CLI).
:param in_stream:
A file-like stream object to used as the subprocess' standard
input. If ``None`` (the default), ``sys.stdin`` will be used.
If ``False``, will disable stdin mirroring entirely (though other
functionality which writes to the subprocess' stdin, such as
autoresponding, will still function.) Disabling stdin mirroring can
help when ``sys.stdin`` is a misbehaving non-stream object, such as
under test harnesses or headless command runners.
:param out_stream:
A file-like stream object to which the subprocess' standard output
should be written. If ``None`` (the default), ``sys.stdout`` will
be used.
:param bool pty:
By default, ``run`` connects directly to the invoked process and
reads its stdout/stderr streams. Some programs will buffer (or even
behave) differently in this situation compared to using an actual
terminal or pseudoterminal (pty). To use a pty instead of the
default behavior, specify ``pty=True``.
.. warning::
Due to their nature, ptys have a single output stream, so the
ability to tell stdout apart from stderr is **not possible**
when ``pty=True``. As such, all output will appear on
``out_stream`` (see below) and be captured into the ``stdout``
result attribute. ``err_stream`` and ``stderr`` will always be
empty when ``pty=True``.
:param bool replace_env:
When ``True``, causes the subprocess to receive the dictionary
given to ``env`` as its entire shell environment, instead of
updating a copy of ``os.environ`` (which is the default behavior).
Default: ``False``.
:param str shell:
Which shell binary to use. Default: ``/bin/bash`` (on Unix;
``COMSPEC`` or ``cmd.exe`` on Windows.)
:param timeout:
Cause the runner to submit an interrupt to the subprocess and raise
`.CommandTimedOut`, if the command takes longer than ``timeout``
seconds to execute. Defaults to ``None``, meaning no timeout.
.. versionadded:: 1.3
:param bool warn:
Whether to warn and continue, instead of raising
`.UnexpectedExit`, when the executed command exits with a
nonzero status. Default: ``False``.
.. note::
This setting has no effect on exceptions, which will still be
raised, typically bundled in `.ThreadException` objects if they
were raised by the IO worker threads.
Similarly, `.WatcherError` exceptions raised by
`.StreamWatcher` instances will also ignore this setting, and
will usually be bundled inside `.Failure` objects (in order to
preserve the execution context).
Ditto `.CommandTimedOut` - basically, anything that prevents a
command from actually getting to "exited with an exit code"
ignores this flag.
:param watchers:
A list of `.StreamWatcher` instances which will be used to scan the
program's ``stdout`` or ``stderr`` and may write into its ``stdin``
(typically ``bytes`` objects) in response to patterns or other
heuristics.
See :doc:`/concepts/watchers` for details on this functionality.
Default: ``[]``.
:returns:
`Result`, or a subclass thereof.
:raises:
`.UnexpectedExit`, if the command exited nonzero and
``warn`` was ``False``.
:raises:
`.Failure`, if the command didn't even exit cleanly, e.g. if a
`.StreamWatcher` raised `.WatcherError`.
:raises:
`.ThreadException` (if the background I/O threads encountered
exceptions other than `.WatcherError`).
.. versionadded:: 1.0
)<04> _run_bodyr8r9<00>stop<6F>r:r?r@s&&,r*<00>run<75>
Runner.run}sd<00><00>Z <1C><17>><3E>><3E>'<27>4<>V<EFBFBD>4<><18>&<26>&<26>&<26>$<24>.<2E>.<2E>.<2E><14> <09> <09> <0B>+9<>&<26><>D<EFBFBD>&<26>&<26>&<26>$<24>.<2E>.<2E>.<2E><14> <09> <09> <0B>+9<>&<26>s<00>A <00> $B<03>0Bc<00>$<<01>V^8<>dQhRS[RR/#)r$r?r&N<>rC)r(r)s"<22>r*r+r,<00>s<00><><00>@<01>@<01>C<EFBFBD>@<01>D<EFBFBD>@r-c<08>^<00>\VPR,PVR74R#)<03> echo_format)r?N)<03>print<6E>optsr()r:r?s&&r*<00>echo<68> Runner.echo<68>s!<00><00> <0A>d<EFBFBD>i<EFBFBD>i<EFBFBD> <0A>&<26>-<2D>-<2D>g<EFBFBD>-<2D>><3E>?r-c<00>*<<01>V^8<>dQhRS[RS[RR/#)r$r?r@r&N)rCr)r(r)s"<22>r*r+r,<00>s"<00><><00>
<EFBFBD>
<EFBFBD>c<EFBFBD>
<EFBFBD>3<EFBFBD>
<EFBFBD>4<EFBFBD>
r-c  <0C><><00>VPV4VPVPR,VPR,4VnVPR,;'gVP 4VnVPR,'dVP V4\VVPR,VPVPVPR,VP
R7Vn R#) z;
Prepare data on ``self`` so we're ready to start running.
<EFBFBD>env<6E> replace_env<6E>encodingrP<00>shell<6C>hide)r?rWrT<00>ptyrXrVN)
<EFBFBD>_unify_kwargs_with_config<69> generate_envrOrT<00>default_encodingrVrP<00>dict<63> using_pty<74> result_kwargsrGs&&&r*<00>_setup<75> Runner._setup<75>s<><00><00>
<0A>&<26>&<26>v<EFBFBD>.<2E><17>$<24>$<24> <10>I<EFBFBD>I<EFBFBD>e<EFBFBD> <1C>d<EFBFBD>i<EFBFBD>i<EFBFBD> <0A>6<>
<EFBFBD><04><08><1D> <09> <09>*<2A>-<2D>H<>H<><14>1F<31>1F<31>1H<31><04> <0A> <0F>9<EFBFBD>9<EFBFBD>V<EFBFBD> <1C> <1C> <10>I<EFBFBD>I<EFBFBD>g<EFBFBD> <1E>
"<22><1B><16>)<29>)<29>G<EFBFBD>$<24><14><08><08><14><0E><0E><15><19><19>6<EFBFBD>"<22><19>]<5D>]<5D> 
<EFBFBD><04>r-c<00>:<<01>V^8<>dQhRS[RS[RS[R,/#r>rB)r(r)s"<22>r*r+r,<00>s,<00><><00>M<01>M<01><13>M<01><03>M<01><08><18>8J<38>Mr-c <08>z<00>VPW4VPR,'d*VP!R/\VPRR^R7B#VP WPR,VP 4VP'dR#VPVPR,4VP4wVn
Vn Vn VPP4FpVP 4K VP'dVP4#VP!4#)<07>dry<72><00><03>stdout<75>stderr<72>exitedrWN<>timeoutr')r`rO<00>generate_resultr]r_<00>startrTr9<00> start_timer<65>create_io_threads<64>threadsrgrh<00>valuesr8<00> make_promise<73>_finish)r:r?r@<00>threads&&, r*rE<00>Runner._run_body<64>s<><00><00> <0C> <0B> <0B>G<EFBFBD>$<24> <0F>9<EFBFBD>9<EFBFBD>U<EFBFBD> <1B> <1B><17>'<27>'<27><0E><16>t<EFBFBD>)<29>)<29>"<22>R<EFBFBD><01>J<><0E> <0E> <0A>
<EFBFBD>
<EFBFBD>7<EFBFBD>I<EFBFBD>I<EFBFBD>g<EFBFBD>.<2E><04><08><08>9<> <10>><3E>><3E>><3E><17> <0C><18><18><14><19><19>9<EFBFBD>-<2D>.<2E>15<31>1G<31>1G<31>1I<31>.<2E><04> <0C>d<EFBFBD>k<EFBFBD>4<EFBFBD>;<3B><1A>l<EFBFBD>l<EFBFBD>)<29>)<29>+<2B>F<EFBFBD> <12>L<EFBFBD>L<EFBFBD>N<EFBFBD>,<2C>'+<2B>&8<>&8<>&8<>t<EFBFBD> <20> <20>"<22>L<>d<EFBFBD>l<EFBFBD>l<EFBFBD>n<EFBFBD>Lr-c<00><<01>V^8<>dQhRR/#<00>r$r&<00>Promiser')r(r)s"<22>r*r+r,<00>s<00><><00><1D><1D>i<EFBFBD>r-c <0C><00>\V4#)z\
Return a `Promise` allowing async control of the rest of lifecycle.
.. versionadded:: 1.4
)rw<00>r:s&r*rq<00>Runner.make_promise<73>s<00><00> <17>t<EFBFBD>}<7D>r-c<00><<01>V^8<>dQhRR/#)r$r&rAr')r(r)s"<22>r*r+r,<00>s<00><><00>:<16>:<16><18>:r-c<08><><00>VP4TPP 4.p.pTP
P 4F<>wrETPTPT44TP4pTfK;TPp\T\4'dTPT4KpTPT4K<> T'd \T4hTPT4pT'd\!Y<>^,R7hTP"R,p T eTP$'d \'Y<>R7hT'g%TP"R,'g \)T4hT# \dpTPT4Rp?EK<>Rp?ii;i TPP 4.p.pTP
P 4F<>wrETPTPT44TP4pTfK;TPp\T\4'dTPT4KpTPT4K<> i;i)TN)<01>reasonrj)rj<00>warn)<15>wait<69>KeyboardInterrupt<70>send_interruptr1<00>setro<00>items<6D>join<69>_thread_join_timeout<75> exception<6F>value<75>
isinstancer<00>appendr<00>_collate_resultrrO<00> timed_outrr)
r:<00>e<>watcher_errors<72>thread_exceptions<6E>targetrsr<><00>real<61>resultrjs
& r*rr<00>Runner._finish<73>s<><00><00>! <<3C><16>+<2B><18>I<EFBFBD>I<EFBFBD>K<EFBFBD><19> <11> !<21> !<21> %<25> %<25> '<27>
 <20>N<EFBFBD> "<22> <1D>"&<26>,<2C>,<2C>"4<>"4<>"6<><0E><06><16> <0B> <0B>D<EFBFBD>5<>5<>f<EFBFBD>=<3D>><3E>"<22>,<2C>,<2C>.<2E> <09><1C>(<28>$<24>?<3F>?<3F>D<EFBFBD>!<21>$<24> <0C>5<>5<>&<26>-<2D>-<2D>d<EFBFBD>3<>)<29>0<>0<><19>;<3B>#7<> <1D>!<21>"3<>4<> 4<><15>%<25>%<25>n<EFBFBD>5<><06> <1A><1A>&<26><01>):<3A>;<3B> ;<3B><16>)<29>)<29>I<EFBFBD>&<26><07> <12> <1E>4<EFBFBD>><3E>><3E>><3E>!<21>&<26>:<3A> :<3A><16>$<24>)<29>)<29>F<EFBFBD>+<2B>+<2B> <20><16>(<28> (<28><15> <0A><>_)<29>+<2B><18>'<27>'<27><01>*<2A>*<2A><>+<2B><> <11> !<21> !<21> %<25> %<25> '<27>
 <20>N<EFBFBD> "<22> <1D>"&<26>,<2C>,<2C>"4<>"4<>"6<><0E><06><16> <0B> <0B>D<EFBFBD>5<>5<>f<EFBFBD>=<3D>><3E>"<22>,<2C>,<2C>.<2E> <09><1C>(<28>$<24>?<3F>?<3F>D<EFBFBD>!<21>$<24> <0C>5<>5<>&<26>-<2D>-<2D>d<EFBFBD>3<>)<29>0<>0<><19>;<3B>#7<>s;<00>F<00>E4<00>F<00>4 F<03>?F<03>F<00>F<03>F<00>A/I<03>A Ic<00>$<<01>V^8<>dQhRS[RR/#)r$r@r&N<>r)r(r)s"<22>r*r+r, s<00><><00>:O<01>:O<01><03>:O<01><04>:Or-c <0C>l<00>/pVPPPP4F!wr4VP VR4pVfTMTW#&K# VPPP
P pVP RV4VR&V'd;Rp\VP\VP44^,44hVR,Vn VR,Vn VP'd VP'dRp\V4hVR,RJdR VR
&VR ,RJdRVR
&VP'dRVR&VR ,VR ,r<>\VR,W<>4VR&Vf\P pV f\P"p VR,p
V
f%VP'dR M\P$p
VP'VR,VR,4VnVR,'dVR,VnW nRVRV RV
/VnR#)z<>
Unify `run` kwargs with config options to arrive at local options.
Sets:
- ``self.opts`` - opts dict
- ``self.streams`` - map of stream names to stream target values
Nrjz-run() got an unexpected keyword argument '{}'<27> asynchronous<75>disownz>Cannot give both 'asynchronous' and 'disown' at the same time!rXTFrPrd<00>
out_stream<EFBFBD>
err_stream<EFBFBD> in_streamrY<00>fallbackr6<00>out<75>err<72>in)r%<00>configrHr<><00>pop<6F>timeoutsr?<00> TypeErrorr(<00>list<73>keysr8r9<00>
ValueError<EFBFBD>normalize_hide<64>sysrgrh<00>stdin<69>should_use_ptyr^r6rO<00>streams) r:r@rO<00>keyr<79><00>runtime<6D>config_timeoutr<74>r<>r<>r<>s && r*rZ<00> Runner._unify_kwargs_with_config s<><00><00><12><04><1E>,<2C>,<2C>-<2D>-<2D>1<>1<>7<>7<>9<>J<EFBFBD>C<EFBFBD><1C>j<EFBFBD>j<EFBFBD><13>d<EFBFBD>+<2B>G<EFBFBD>!(<28><1F><05>g<EFBFBD>D<EFBFBD>I<EFBFBD>:<3A>
<1E><1C><1C>,<2C>,<2C>5<>5<>=<3D>=<3D><0E> <20>*<2A>*<2A>Y<EFBFBD><0E>?<3F><04>Y<EFBFBD><0F> <12>A<>C<EFBFBD><1B>C<EFBFBD>J<EFBFBD>J<EFBFBD>t<EFBFBD>F<EFBFBD>K<EFBFBD>K<EFBFBD>M<EFBFBD>':<3A>1<EFBFBD>'=<3D>><3E>?<3F> ?<3F>!<21>.<2E>1<><04><1A><1D>h<EFBFBD><1E><04><0E> <0F> <1D> <1D> <1D>$<24>.<2E>.<2E>.<2E>R<>C<EFBFBD><1C>S<EFBFBD>/<2F> !<21> <0F><06><<3C>4<EFBFBD> <1F> <20>D<EFBFBD><16>L<EFBFBD> <0F><05>;<3B>$<24> <1E><1F>D<EFBFBD><16>L<EFBFBD> <0F> <1D> <1D> <1D><1F>D<EFBFBD><16>L<EFBFBD>"&<26>l<EFBFBD>!3<>T<EFBFBD>,<2C>5G<35>J<EFBFBD>%<25>d<EFBFBD>6<EFBFBD>l<EFBFBD>J<EFBFBD>K<><04>V<EFBFBD> <0C> <15> <1D><1C><1A><1A>J<EFBFBD> <15> <1D><1C><1A><1A>J<EFBFBD><18><1B>%<25> <09> <14> <1C>"&<26>!3<>!3<>!3<><05><13><19><19>I<EFBFBD><1D>,<2C>,<2C>T<EFBFBD>%<25>[<5B>$<24>z<EFBFBD>:J<>K<><04><0E> <0F>
<EFBFBD> <1B> <1B> <20><1A>,<2C>D<EFBFBD>M<EFBFBD><18> <09><1D>z<EFBFBD>5<EFBFBD>*<2A>d<EFBFBD>I<EFBFBD>N<><04> r-c<00>4<<01>V^8<>dQhRS[S[,RR/#)r$r<>r&rA)r r)r(r)s"<22>r*r+r,Es <00><><00><16><16>d<EFBFBD><<3C>.@<40><16>X<EFBFBD>r-c <08><><00>RPVP4pRPVP4p\'dEVP RR4P RR4pVP RR4P RR4pV'dRMVP 4pVP !R/\VPW#VR7BpV#)rez
<EFBFBD>
<EFBFBD> Nrfr') r<>rgrhr<00>replace<63>
returncoderkr]r_)r:r<>rgrhrir<>s&& r*r<><00>Runner._collate_resultEs<><00><00><14><17><17><14><1B><1B>%<25><06><13><17><17><14><1B><1B>%<25><06> <12>7<EFBFBD> <1C>^<5E>^<5E>F<EFBFBD>D<EFBFBD>1<>9<>9<>$<24><04>E<>F<EFBFBD><1B>^<5E>^<5E>F<EFBFBD>D<EFBFBD>1<>9<>9<>$<24><04>E<>F<EFBFBD> (<28><14>T<EFBFBD>_<EFBFBD>_<EFBFBD>-><3E><06><16>%<25>%<25>
<EFBFBD><12><14>"<22>"<22>6<EFBFBD><16><0E>
<EFBFBD><06>
<16> r-c<00>6<<01>V^8<>dQhRS[RS[S[,/#)r$r<>r&)rr <00>int)r(r)s"<22>r*r+r,as<00><><00><14><14>8<EFBFBD><14><08><13> <0A>r-c<08><><00>WP8XdR#VPpWP8Xd VPpW P9d&VPV,P'd^#R#<00>N)<05> handle_stdin<69> handle_stderr<72> handle_stdoutro<00>is_dead)r:r<><00>opposites&& r*r<><00>Runner._thread_join_timeoutasY<00><00> <12>&<26>&<26> &<26><17><17>%<25>%<25><08> <11>'<27>'<27> '<27><1B>)<29>)<29>H<EFBFBD> <13>|<7C>|<7C> #<23><04> <0C> <0C>X<EFBFBD>(><3E>(F<>(F<>(F<><14>r-c<00>p<<01>V^8<>dQhRS[S[S[S[3,S[S[,S[S[,3,/#<00>r$r&)rr rrr rC)r(r)s"<22>r*r+r,qs4<00><><00>('<27>('<27> <0E>t<EFBFBD>H<EFBFBD>5<>5<>6<><04>S<EFBFBD> <09>4<EFBFBD><03>9<EFBFBD>L<> M<>('r-c <0C>0<00>.p.pVPRVRRVPR,9RVPR,//pVPR,'dHRVPR,RVPR,RVPR ,/W0P&VP'g:RVRR
VPR,9RVPR ,/W0P
&/pVP 4FwrV\WVR 7pWtV&K WAV3#) z<>
Create and return a dictionary of IO thread worker objects.
Caller is expected to handle persisting and/or starting the wrapped
threads.
<EFBFBD>buffer_rXrg<00>outputr<74>r<><00>input_rP<00>
echo_stdinrhr<>)r<>r@)r<>rOr<>r<>r^r<>r<>r)r:rgrh<00> thread_argsror<>r@<00>ts& r*rn<00>Runner.create_io_threadsqs<00><00><1F><06><1E><06> <11> <1E> <1E><19>6<EFBFBD><16><08>D<EFBFBD>I<EFBFBD>I<EFBFBD>f<EFBFBD>$5<>5<><18>$<24>,<2C>,<2C>u<EFBFBD>-<2D>!<0E>,
<EFBFBD> <0B> <10><<3C><<3C><04> <1D> <1D><18>$<24>,<2C>,<2C>t<EFBFBD>,<2C><18>$<24>,<2C>,<2C>u<EFBFBD>-<2D><16><04> <09> <09>,<2C>/<2F>.<0E>K<EFBFBD>)<29>)<29> *<2A>
<14>~<7E>~<7E>~<7E><19>6<EFBFBD><16><08>D<EFBFBD>I<EFBFBD>I<EFBFBD>f<EFBFBD>$5<>5<><18>$<24>,<2C>,<2C>u<EFBFBD>-<2D>/<0E>K<EFBFBD>*<2A>*<2A> +<2B> <15><07>)<29>/<2F>/<2F>1<>N<EFBFBD>F<EFBFBD>'<27>v<EFBFBD>E<>A<EFBFBD><1F>F<EFBFBD>O<EFBFBD>2<><17><06>&<26>&r-c<00>$<<01>V^8<>dQhRS[RR/#)r$r@r&rAr<>)r(r)s"<22>r*r+r,<00>s<00><><00>
 <20>
 <20><03>
 <20><08>
 r-c <0C><00>\R/VB#)a
Create & return a suitable `Result` instance from the given ``kwargs``.
Subclasses may wish to override this in order to manipulate things or
generate a `Result` subclass (e.g. ones containing additional metadata
besides the default).
.. versionadded:: 1.0
r'<00>rA)r:r@s&,r*rk<00>Runner.generate_result<6C>s<00><00><16><1F><06><1F>r-c<00><<<01>V^8<>dQhRS[RS[S[RR3,/#)r$<00>readerr&N)rr
rC)r(r)s"<22>r*r+r,<00>s&<00><><00>$<24>$<24>x<EFBFBD>$<24>I<EFBFBD>c<EFBFBD>4<EFBFBD><14>o<EFBFBD>4N<34>$r-c# <0C>n"<00>V!VP4pV'gR#VPV4x<00>K25i)as
Iteratively read & decode bytes from a subprocess' out/err stream.
:param reader:
A literal reader function/partial, wrapping the actual stream
object in question, which takes a number of bytes to read, and
returns that many bytes (or ``None``).
``reader`` should be a reference to either `read_proc_stdout` or
`read_proc_stderr`, which perform the actual, platform/library
specific read calls.
:returns:
A generator yielding strings.
Specifically, each resulting string is the result of decoding
`read_chunk_size` bytes read from the subprocess' out/err stream.
.. versionadded:: 1.0
N)r3<00>decode)r:r<><00>datas&& r*<00>read_proc_output<75>Runner.read_proc_output<75>s/<00><00><00>6<13><19>$<24>.<2E>.<2E>/<2F>D<EFBFBD><17><15><16>+<2B>+<2B>d<EFBFBD>#<23> #<23>s<00>5<01>5c<00>*<<01>V^8<>dQhRS[RS[RR/#)r$<00>stream<61>stringr&N)r rC)r(r)s"<22>r*r+r,<00>s"<00><><00><17><17>r<EFBFBD><17>3<EFBFBD><17>4<EFBFBD>r-c <0C>H<00>VPV4VP4R#)aH
Write ``string`` to ``stream``.
Also calls ``.flush()`` on ``stream`` to ensure that real terminal
streams don't buffer.
:param stream:
A file-like stream object, mapping to the ``out_stream`` or
``err_stream`` parameters of `run`.
:param string: A Unicode string object.
:returns: ``None``.
.. versionadded:: 1.0
N)<02>write<74>flush)r:r<>r<>s&&&r*<00>write_our_output<75>Runner.write_our_output<75>s<00><00>" <0F> <0C> <0C>V<EFBFBD><1C><0E> <0C> <0C>r-c
<00>F<<01>V^8<>dQhRS[S[,RS[RS[RS[RR/#)r$r<>rXr<>r<>r&N)r rC<00>boolr r)r(r)s"<22>r*r+r,<00>sA<00><><00>"<22>"<22><15>c<EFBFBD><19>"<22><13>"<22><13> "<22>
<19> "<22>
<0E> "r-c<08><><00>VPV4F?pV'gVPW5R7VPV4VPV4KA R#)<02>r<>r<>N)r<>r<>r<><00>respond)r:r<>rXr<>r<>r<>s&&&&& r*<00>_handle_output<75>Runner._handle_output<75>sI<00><00><19>)<29>)<29>&<26>1<>D<EFBFBD> <18><14>%<25>%<25>V<EFBFBD>%<25>A<>
<14>N<EFBFBD>N<EFBFBD>4<EFBFBD> <20> <10>L<EFBFBD>L<EFBFBD><17> !<21>2r-c<00>@<<01>V^8<>dQhRS[S[,RS[RS[RR/#<00>r$r<>rXr<>r&N<>r rCr<>r )r(r)s"<22>r*r+r,<00>s1<00><><00>
<EFBFBD>
<EFBFBD><1B>C<EFBFBD>y<EFBFBD>
<EFBFBD>(,<2C>
<EFBFBD>68<EFBFBD>
<EFBFBD> <0A>
r-c <0C>@<00>VPWW0PR7R#)a<>
Read process' stdout, storing into a buffer & printing/parsing.
Intended for use as a thread target. Only terminates when all stdout
from the subprocess has been read.
:param buffer_: The capture buffer shared with the main thread.
:param bool hide: Whether or not to replay data into ``output``.
:param output:
Output stream (file-like object) to write data into when not
hiding.
:returns: ``None``.
.. versionadded:: 1.0
<EFBFBD>r<>N)r<><00>read_proc_stdout<75>r:r<>rXr<>s&&&&r*r<><00>Runner.handle_stdout<75>s"<00><00>& <0A><1B><1B> <13>6<EFBFBD>*?<3F>*?<3F> <1C>
r-c<00>@<<01>V^8<>dQhRS[S[,RS[RS[RR/#r<>r<>)r(r)s"<22>r*r+r, s1<00><><00> 
<EFBFBD> 
<EFBFBD><1B>C<EFBFBD>y<EFBFBD> 
<EFBFBD>(,<2C> 
<EFBFBD>68<EFBFBD> 
<EFBFBD> <0A> 
r-c <0C>@<00>VPWW0PR7R#)z<>
Read process' stderr, storing into a buffer & printing/parsing.
Identical to `handle_stdout` except for the stream read from; see its
docstring for API details.
.. versionadded:: 1.0
r<EFBFBD>N)r<><00>read_proc_stderrr<72>s&&&&r*r<><00>Runner.handle_stderr s"<00><00> <0A><1B><1B> <13>6<EFBFBD>*?<3F>*?<3F> <1C>
r-c<00>6<<01>V^8<>dQhRS[RS[S[,/#)r$r<>r&)r r rC)r(r)s"<22>r*r+r,s<00><><00>&<16>&<16>R<EFBFBD>&<16>H<EFBFBD>S<EFBFBD>M<EFBFBD>&r-c <0C>0<00>Rp\V4'dKVP\V44pV'd(\ V\4'dVPV4pV# \d+pTP\P
8wdhRp?LaRp?ii;i)a<>
Read & decode bytes from a local stdin stream.
:param input_:
Actual stream object to read from. Maps to ``in_stream`` in `run`,
so will often be ``sys.stdin``, but might be any stream-like
object.
:returns:
A Unicode string, the result of decoding the read bytes (this might
be the empty string if the pipe has closed/reached EOF); or
``None`` if stdin wasn't ready for reading yet.
.. versionadded:: 1.0
N) r<00>readr<00>OSError<6F>errno<6E>EBADFr<46><00>bytesr<73>)r:r<><00>bytes_r<5F>s&& r*<00>read_our_stdin<69>Runner.read_our_stdins~<00><00>&<16><06> <1C>V<EFBFBD> $<24> $<24>
<1A><1F><1B><1B>]<5D>6<EFBFBD>%:<3A>;<3B><06><16>*<2A>V<EFBFBD>U<EFBFBD>3<>3<><1E><1B><1B>V<EFBFBD>,<2C><06><15> <0A><><1B> <1A><15>7<EFBFBD>7<EFBFBD>e<EFBFBD>k<EFBFBD>k<EFBFBD>)<29><19>*<2A><> <1A>s<00>A <00> B<03>+ B<03>Bc<00>0<<01>V^8<>dQhRS[RS[RS[RR/#)r$r<>r<>rPr&N<>r r<>)r(r)s"<22>r*r+r,Bs9<00><><00>@-<2D>@-<2D><12>@-<2D><13>@-<2D><13> @-<2D>
<0E> @-r-c <0C><00>Rp\V4;_uu_4VPV4pV'dBVPV4VfVPW4pV'dVP W%R7M0Ve-VP
'gV'gVP 4RpVPP4'd
V'gM"\P!VP4K<>RRR4R# +'giR#;i)a
Read local stdin, copying into process' stdin as necessary.
Intended for use as a thread target.
.. note::
Because real terminal stdin streams have no well-defined "end", if
such a stream is detected (based on existence of a callable
``.fileno()``) this method will wait until `program_finished` is
set, before terminating.
When the stream doesn't appear to be from a terminal, the same
semantics as `handle_stdout` are used - the stream is simply
``read()`` from until it returns an empty value.
:param input_: Stream (file-like object) from which to read.
:param output: Stream (file-like object) to which echoing may occur.
:param bool echo: User override option for stdin-stdout echoing.
:returns: ``None``.
.. versionadded:: 1.0
FTNr<EFBFBD>) rr<><00>write_proc_stdin<69>should_echo_stdinr<6E>r^<00>close_proc_stdinr1<00>is_set<65>time<6D>sleepr4)r:r<>r<>rP<00> closed_stdinr<6E>s&&&& r*r<><00>Runner.handle_stdinBs<><00><00>D<1D> <0C> <1F><06> '<27> '<27><16><1B>*<2A>*<2A>6<EFBFBD>2<><04><17>
<19>)<29>)<29>$<24>/<2F><1C>|<7C>#<23>5<>5<>f<EFBFBD>E<><04><1B><1C>-<2D>-<2D>V<EFBFBD>-<2D>I<><49><19>%<25> <20>><3E>><3E>><3E>,<2C><1C>-<2D>-<2D>/<2F>'+<2B> <0C>
<18>(<28>(<28>/<2F>/<2F>1<>1<>$<24><19><14>
<EFBFBD>
<EFBFBD>4<EFBFBD>+<2B>+<2B>,<2C>;(<28> '<27> '<27> '<27>s.<00>C7<05>-C7<05>(C7<05>C7<05>1C7<05>C7<05>
#C7<05>7 D c<00>,<<01>V^8<>dQhRS[RS[RS[/#)r$r<>r<>r&r<>)r(r)s"<22>r*r+r,<00>s"<00><><00> 7<> 7<><02> 7<>B<EFBFBD> 7<>4<EFBFBD> 7r-c <0C>J<00>VP'*;'d \V4#)a
Determine whether data read from ``input_`` should echo to ``output``.
Used by `handle_stdin`; tests attributes of ``input_`` and ``output``.
:param input_: Input stream (file-like object).
:param output: Output stream (file-like object).
:returns: A ``bool``.
.. versionadded:: 1.0
)r^r)r:r<>r<>s&&&r*r<><00>Runner.should_echo_stdin<69>s<00><00><19>N<EFBFBD>N<EFBFBD>"<22>6<>6<><06>v<EFBFBD><0E>6r-c<00>4<<01>V^8<>dQhRS[S[,RR/#)r$r<>r&N)r rC)r(r)s"<22>r*r+r,<00>s<00><><00>0<>0<>t<EFBFBD>C<EFBFBD>y<EFBFBD>0<>T<EFBFBD>0r-c <0C><><00>RPV4pVPF,pVPV4FpVPV4K K. R#)aj
Write to the program's stdin in response to patterns in ``buffer_``.
The patterns and responses are driven by the `.StreamWatcher` instances
from the ``watchers`` kwarg of `run` - see :doc:`/concepts/watchers`
for a conceptual overview.
:param buffer:
The capture buffer for this thread's particular IO stream.
:returns: ``None``.
.. versionadded:: 1.0
reN)r<>r6<00>submitr<74>)r:r<>r<><00>watcher<65>responses&& r*r<><00>Runner.respond<6E>sA<00><00>,<14><17><17><17>!<21><06><1B>}<7D>}<7D>G<EFBFBD>#<23>N<EFBFBD>N<EFBFBD>6<EFBFBD>2<><08><14>%<25>%<25>h<EFBFBD>/<2F>3<>%r-c<00>X<<01>V^8<>dQhRS[S[S[3,RS[RS[S[S[3,/#)r$rTrUr&<00>r rCrr<>)r(r)s"<22>r*r+r,<00>s5<00><><00>?<3F>?<3F><17><03>S<EFBFBD><08>><3E>?<3F>04<30>?<3F> <0A>c<EFBFBD>3<EFBFBD>h<EFBFBD><1E>?r-c <0C>J<00>V'dV#\\P3/VB#)a>
Return a suitable environment dict based on user input & behavior.
:param dict env: Dict supplying overrides or full env, depending.
:param bool replace_env:
Whether ``env`` updates, or is used in place of, the value of
`os.environ`.
:returns: A dictionary of shell environment vars.
.. versionadded:: 1.0
)r]<00>os<6F>environ)r:rTrUs&&&r*r[<00>Runner.generate_env<6E>s<00><00>"<22>s<EFBFBD>><3E>t<EFBFBD>B<EFBFBD>J<EFBFBD>J<EFBFBD>'><3E>#<23>'><3E>>r-c<00>,<<01>V^8<>dQhRS[RS[RS[/#<00>r$rYr<>r&<00>r<>)r(r)s"<22>r*r+r,<00>s"<00><><00> <13> <13>$<24> <13>$<24> <13>4<EFBFBD> r-c <0C><00>V#)a,
Should execution attempt to use a pseudo-terminal?
:param bool pty:
Whether the user explicitly asked for a pty.
:param bool fallback:
Whether falling back to non-pty execution should be allowed, in
situations where ``pty=True`` but a pty could not be allocated.
.. versionadded:: 1.0
r')r:rYr<>s&&&r*r<><00>Runner.should_use_pty<74>s <00><00><13>
r-c<00> <<01>V^8<>dQhRS[/#r<>r)r(r)s"<22>r*r+r,<00>s<00><><00>=<3D>=<3D>$<24>=r-c <0C><><00>\;QJd4RVPP44F 'gK R# R#!RVPP444#)a]
Detect whether any IO threads appear to have terminated unexpectedly.
Used during process-completion waiting (in `wait`) to ensure we don't
deadlock our child process if our IO processing threads have
errored/died.
:returns:
``True`` if any threads appear to have terminated with an
exception, ``False`` otherwise.
.. versionadded:: 1.0
c3<00>8"<00>TFqPx<00>K R#5ir<>)r<>)<02>.0<EFBFBD>xs& r*<00> <genexpr><3E>*Runner.has_dead_threads.<locals>.<genexpr><3E>s<00><00><00><<3C>&;<3B><11>9<EFBFBD>9<EFBFBD>&;<3B>s<00>TF)<03>anyrorprys&r*<00>has_dead_threads<64>Runner.has_dead_threads<64>sG<00><00><13>s<EFBFBD><<3C>d<EFBFBD>l<EFBFBD>l<EFBFBD>&9<>&9<>&;<3B><<3C>s<EFBFBD>s<EFBFBD><<3C>s<EFBFBD><<3C>s<EFBFBD><<3C>d<EFBFBD>l<EFBFBD>l<EFBFBD>&9<>&9<>&;<3B><<3C><<3C><r-c<00><<01>V^8<>dQhRR/#<00>r$r&Nr')r(r)s"<22>r*r+r,<00>s<00><><00> )<29> )<29>d<EFBFBD> )r-c <0C><><00>VPpVPpV'g V'dR#\P!VP4KM)ze
Block until the running command appears to have exited.
:returns: ``None``.
.. versionadded:: 1.0
N)<05>process_is_finishedr!rrr4)r:<00> proc_finished<65> dead_threadss& r*r<00> Runner.wait<69>s7<00><00><13> <20>4<>4<>M<EFBFBD><1F>0<>0<>L<EFBFBD><1C> <0C><15> <10>J<EFBFBD>J<EFBFBD>t<EFBFBD>'<27>'<27> (r-c<00>$<<01>V^8<>dQhRS[RR/#<00>r$r<>r&NrK)r(r)s"<22>r*r+r,<00>s<00><><00> ;<3B> ;<3B>S<EFBFBD> ;<3B>T<EFBFBD> ;r-c <0C>Z<00>VPVPVP44R#)z<>
Write encoded ``data`` to the running process' stdin.
:param data: A Unicode string.
:returns: ``None``.
.. versionadded:: 1.0
N)<03>_write_proc_stdin<69>encoderV<00>r:r<>s&&r*r<><00>Runner.write_proc_stdin<69>s<00><00> <0A><1E><1E>t<EFBFBD>{<7B>{<7B>4<EFBFBD>=<3D>=<3D>9<>:r-c<00>&<<01>V^8<>dQhRS[RS[/#)r$r<>r&)r<>rC)r(r)s"<22>r*r+r,<00>s<00><><00>5<>5<>5<EFBFBD>5<>S<EFBFBD>5r-c <0C>:<00>VPVPR4#)zG
Decode some ``data`` bytes, returning Unicode.
.. versionadded:: 1.0
r<EFBFBD>)r<>rVr/s&&r*r<><00> Runner.decode<64>s<00><00><14>{<7B>{<7B>4<EFBFBD>=<3D>=<3D>)<29>4<>4r-c<00> <<01>V^8<>dQhRS[/#r<>r)r(r)s"<22>r*r+r,s<00><><00>"<22>"<22>T<EFBFBD>"r-c <0C><00>\h)a
Determine whether our subprocess has terminated.
.. note::
The implementation of this method should be nonblocking, as it is
used within a query/poll loop.
:returns:
``True`` if the subprocess has finished running, ``False``
otherwise.
.. versionadded:: 1.0
<EFBFBD><01>NotImplementedErrorrys&r*r&<00>Runner.process_is_finisheds
<00><00>"<22>!r-c<00>F<<01>V^8<>dQhRS[RS[RS[S[S[3,RR/#<00>r$r?rWrTr&N<>rCr r)r(r)s"<22>r*r+r,s1<00><><00>"<22>"<22>S<EFBFBD>"<22><13>"<22>4<EFBFBD><03>S<EFBFBD><08>><3E>"<22>d<EFBFBD>"r-c <0C><00>\h)a
Initiate execution of ``command`` (via ``shell``, with ``env``).
Typically this means use of a forked subprocess or requesting start of
execution on a remote system.
In most cases, this method will also set subclass-specific member
variables used in other methods such as `wait` and/or `returncode`.
:param str command:
Command string to execute.
:param str shell:
Shell to use when executing ``command``.
:param dict env:
Environment dict used to prep shell environment.
.. versionadded:: 1.0
r6)r:r?rWrTs&&&&r*rl<00> Runner.starts
<00><00>*"<22>!r-c<00>$<<01>V^8<>dQhRS[RR/#)r$rjr&N<>r<>)r(r)s"<22>r*r+r,-s<00><><00> <20> <20>3<EFBFBD> <20>4<EFBFBD> r-c <0C><><00>VeB\P!WP4VnVPP 4R#R#)zC
Start a timer to `kill` our subprocess after ``timeout`` seconds.
N)r/<00>Timer<65>killr7rl)r:rjs&&r*rm<00>Runner.start_timer-s3<00><00> <13> <1E>#<23>/<2F>/<2F>'<27>9<EFBFBD>9<EFBFBD>=<3D>D<EFBFBD>K<EFBFBD> <10>K<EFBFBD>K<EFBFBD> <1D> <1D> <1F> r-c<00>6<<01>V^8<>dQhRS[RS[S[,/#<00>r$<00> num_bytesr&<00>r<>r r<>)r(r)s"<22>r*r+r,5<00><00><><00>
"<22>
"<22>#<23>
"<22>(<28>5<EFBFBD>/<2F>
"r-c <0C><00>\h)z<>
Read ``num_bytes`` from the running process' stdout stream.
:param int num_bytes: Number of bytes to read at maximum.
:returns: A string/bytes object.
.. versionadded:: 1.0
r6<00>r:rFs&&r*r<><00>Runner.read_proc_stdout5<00>
<00><00>"<22>!r-c<00>6<<01>V^8<>dQhRS[RS[S[,/#rErG)r(r)s"<22>r*r+r,ArHr-c <0C><00>\h)z<>
Read ``num_bytes`` from the running process' stderr stream.
:param int num_bytes: Number of bytes to read at maximum.
:returns: A string/bytes object.
.. versionadded:: 1.0
r6rJs&&r*r<><00>Runner.read_proc_stderrArLr-c<00>$<<01>V^8<>dQhRS[RR/#r+<00>r<>)r(r)s"<22>r*r+r,Ms<00><><00> "<22> "<22>e<EFBFBD> "<22><04> "r-c <0C><00>\h)a
Write ``data`` to running process' stdin.
This should never be called directly; it's for subclasses to implement.
See `write_proc_stdin` for the public API call.
:param data: Already-encoded byte data suitable for writing.
:returns: ``None``.
.. versionadded:: 1.0
r6r/s&&r*r-<00>Runner._write_proc_stdinMs
<00><00>"<22>!r-c<00><<01>V^8<>dQhRR/#r$r')r(r)s"<22>r*r+r,\s<00><><00>"<22>"<22>$<24>"r-c <0C><00>\h)zK
Close running process' stdin.
:returns: ``None``.
.. versionadded:: 1.3
r6rys&r*r<><00>Runner.close_proc_stdin\s
<00><00>"<22>!r-c<00> <<01>V^8<>dQhRS[/#r<>rK)r(r)s"<22>r*r+r,fs<00><><00>
"<22>
"<22>#<23>
"r-c <0C><00>\4#)z<>
Return a string naming the expected encoding of subprocess streams.
This return value should be suitable for use by encode/decode methods.
.. versionadded:: 1.0
)r\rys&r*r\<00>Runner.default_encodingfs <00><00> <20>!<21>!r-c<00>"<<01>V^8<>dQhRRRR/#)r$<00> interruptr<74>r&Nr')r(r)s"<22>r*r+r,rs<00><><00>&<26>&<26>(;<3B>&<26><04>&r-c <0C>(<00>VPR4R#)a<>
Submit an interrupt signal to the running subprocess.
In almost all implementations, the default behavior is what will be
desired: submit ```` to the subprocess' stdin pipe. However, we
leave this as a public method in case this default needs to be
augmented or replaced.
:param interrupt:
The locally-sourced ``KeyboardInterrupt`` causing the method call.
:returns: ``None``.
.. versionadded:: 1.0
<EFBFBD>N)r<>)r:r[s&&r*r<><00>Runner.send_interruptrs<00><00> <0A><1D><1D>f<EFBFBD>%r-c<00>0<<01>V^8<>dQhRS[S[,/#r<><00>r r<>)r(r)s"<22>r*r+r,<00>s<00><><00>
"<22>
"<22>H<EFBFBD>S<EFBFBD>M<EFBFBD>
"r-c <0C><00>\h)z<>
Return the numeric return/exit code resulting from command execution.
:returns:
`int`, if any reasonable return code could be determined, or
``None`` in corner cases where that was not possible.
.. versionadded:: 1.0
r6rys&r*r<><00>Runner.returncode<64>rLr-c<00><<01>V^8<>dQhRR/#r$r')r(r)s"<22>r*r+r,<00>s<00><><00> !<21> !<21>d<EFBFBD> !r-c <0C>b<00>VP'dVPP4R#R#)a
Perform final cleanup, if necessary.
This method is called within a ``finally`` clause inside the main `run`
method. Depending on the subclass, it may be a no-op, or it may do
things such as close network connections or open files.
:returns: ``None``
.. versionadded:: 1.0
N)r7<00>cancelrys&r*rF<00> Runner.stop<6F>s"<00><00> <10>;<3B>;<3B>;<3B> <10>K<EFBFBD>K<EFBFBD> <1E> <1E> <20> r-c<00><<01>V^8<>dQhRR/#r$r')r(r)s"<22>r*r+r,<00>s<00><><00>
"<22>
"<22>d<EFBFBD>
"r-c <0C><00>\h)a#
Forcibly terminate the subprocess.
Typically only used by the timeout functionality.
This is often a "best-effort" attempt, e.g. remote subprocesses often
must settle for simply shutting down the local side of the network
connection and hoping the remote end eventually gets the message.
r6rys&r*rB<00> Runner.kill<6C>rLr-c<00> <<01>V^8<>dQhRS[/#r<>r)r(r)s"<22>r*r+r,<00>s<00><><00>@<01>@<01>4<EFBFBD>@r-c <0C>z<00>\VP;'d VPP4'*4#)zY
Returns ``True`` if the subprocess stopped because it timed out.
.. versionadded:: 1.3
)r<>r7<00>is_aliverys&r*r<><00>Runner.timed_out<75>s+<00><00><14>D<EFBFBD>K<EFBFBD>K<EFBFBD>><3E>><3E><04> <0B> <0B>(<<3C>(<<3C>(><3E>$><3E>?<3F>?r-c<00>H<<01>V^8<>dQh/S[S[S[3,;R&S[;R&#)r$rOr^r)r(r)s"<22>r*r+r,=s&<00><><00><00> <0F>s<EFBFBD>C<EFBFBD>x<EFBFBD>.<2E><18><01><14>O<EFBFBD>r-)r8r9r7r%rVrTr4rOr1r3r_rhrgr<>ror^r5r6N)F)3<>__name__<5F>
__module__<EFBFBD> __qualname__<5F>__firstlineno__<5F>__doc__r3r4r;rHrPr`rErqrrrZr<>r<>rnrkr<>r<>r<>r<>r<>r<>r<>r<>r<>r[r<><00>propertyr!rr<>r<>r&rlrmr<>r<>r-r<>r\r<>r<>rFrBr<><00>__annotate_func__<5F>__static_attributes__<5F>__classdictcell__<5F>r)s@r*r!r!=s<><00><><00><00><08><1B>O<EFBFBD><16>K<EFBFBD>.<1F>.<1F>`Q<1C>Q<1C>f@<01>@<01>
<EFBFBD>
<EFBFBD>8M<01>M<01>,<1D><1D>:<16>:<16>x:O<01>:O<01>x<16><16>8<14><14> ('<27>('<27>T
 <20>
 <20>$<24>$<24>B<17><17>("<22>"<22>0
<EFBFBD>
<EFBFBD>. 
<EFBFBD> 
<EFBFBD>&<16>&<16>P@-<2D>@-<2D>D 7<> 7<>0<>0<>6?<3F>?<3F>" <13> <13><0E>=<3D><0E>=<3D> )<29> )<29> ;<3B> ;<3B>5<>5<><0E>"<22><0E>"<22> "<22>"<22>. <20> <20>
"<22>
"<22>
"<22>
"<22> "<22> "<22>"<22>"<22>
"<22>
"<22>&<26>&<26>$
"<22>
"<22> !<21> !<21>
"<22>
"<22><0E>@<01><0E>@<01>_#<01>r-r!c<00>
aa<01>]tRtRtoRtV3RlV3RlltRV3RlRlltV3RlRltV3R lR
ltV3R lR lt V3R lRlt
V3RlRlt V3RlRlt ] V3RlRl4tV3RlRltV3RlV3RlltRtVtV;t#)<1B>Locali<6C>a
Execute a command on the local system in a subprocess.
.. note::
When Invoke itself is executed without a controlling terminal (e.g.
when ``sys.stdin`` lacks a useful ``fileno``), it's not possible to
present a handle on our PTY to local subprocesses. In such situations,
`Local` will fallback to behaving as if ``pty=False`` (on the theory
that degraded execution is better than none at all) as well as printing
a warning to stderr.
To disable this behavior, say ``fallback=False``.
.. versionadded:: 1.0
c<00>"<<01>V^8<>dQhRRRR/#r#r')r(r)s"<22>r*r+<00>Local.__annotate__<5F>s<00><><00><18><18> <09><18>d<EFBFBD>r-c<08>4<<01>\SV`V4^VnR#<00>rN)<03>superr;<00>status)r:r%r2s&&<26>r*r;<00>Local.__init__<5F>s<00><><00> <0A><07><18><17>!<21><17><04> r-c<00>,<<01>V^8<>dQhRS[RS[RS[/#rr)r(r)s"<22>r*r+r|<00>s"<00><><00> <17> <17>$<24> <17>$<24> <17>$<24> r-c<08><><00>RpV'dfRp\\P4'gEV'd=VP'g)Rp\PP V4RVnRpV#)FTzAWARNING: stdin has no fileno; falling back to non-pty execution!
)rr<>r<>r5rhr<>)r:rYr<><00>use_ptyr<79>s&&& r*r<><00>Local.should_use_pty<74>sU<00><00><17><07> <0E><1A>G<EFBFBD><1D>c<EFBFBD>i<EFBFBD>i<EFBFBD>(<28>(<28>X<EFBFBD><1B>5<>5<>5<>^<5E>C<EFBFBD><17>J<EFBFBD>J<EFBFBD>$<24>$<24>S<EFBFBD>)<29>59<35>D<EFBFBD>2<><1F><07><16>r-c<00>6<<01>V^8<>dQhRS[RS[S[,/#rErG)r(r)s"<22>r*r+r|<00>s<00><><00><14><14>#<23><14>(<28>5<EFBFBD>/<2F>r-c<08>a<05>VP'd%\P!VPV4pV#VP'dXVPP'd<\P!VPPP4V4pV#RpV# \d\p\ T4oRp\ ;QJdT3RlT4F 'gK RM RM!T3RlT44'ghRpRp?T#Rp?ii;i)<06>Input/output errorc3<00>,<"<00>TF qS9x<00>K R#5ir<>r')r<00>error<6F> stringifieds& <20>r*r<00>)Local.read_proc_stdout.<locals>.<genexpr><3E>s<00><><00><00>G<>Y<EFBFBD>E<EFBFBD>K<EFBFBD>/<2F>Y<EFBFBD>s<00>TFN)r<>z I/O error)
r^rr<><00> parent_fdr<64>rCr <00>processrg<00>fileno)r:rFr<>r<><00> io_errorsr<73>s&& @r*r<><00>Local.read_proc_stdout<75>s<><00><><00> <0F>><3E>><3E>><3E> <1C><19>w<EFBFBD>w<EFBFBD>t<EFBFBD>~<7E>~<7E>y<EFBFBD>9<><04>(<14> <0B> <12>\<5C>\<5C>\<5C>d<EFBFBD>l<EFBFBD>l<EFBFBD>1<>1<>1<><15>7<EFBFBD>7<EFBFBD>4<EFBFBD><<3C><<3C>.<2E>.<2E>5<>5<>7<><19>C<>D<EFBFBD><14> <0B><18>D<EFBFBD><13> <0B><>'<1B> <1C>!<21>!<21>f<EFBFBD> <0B><12> <09> <1B>s<EFBFBD>G<>Y<EFBFBD>G<>s<EFBFBD>s<EFBFBD>s<EFBFBD>G<>Y<EFBFBD>G<>G<>G<><19><1C><04>
<14> <0B><>' <1C>s#<00>!B%<00>% D <03>0,D<03>D<03>=D<03>D c<00>6<<01>V^8<>dQhRS[RS[S[,/#rErG)r(r)s"<22>r*r+r|<00>s<00><><00><14><14>#<23><14>(<28>5<EFBFBD>/<2F>r-c<08><><00>VP'dVVPP'd:\P!VPPP 4V4#R#r<>)r<>rhrr<>r<>rJs&&r*r<><00>Local.read_proc_stderr<72>sC<00><00> <10><<3C><<3C><<3C>D<EFBFBD>L<EFBFBD>L<EFBFBD>/<2F>/<2F>/<2F><15>7<EFBFBD>7<EFBFBD>4<EFBFBD><<3C><<3C>.<2E>.<2E>5<>5<>7<><19>C<> C<>r-c<00>$<<01>V^8<>dQhRS[RR/#r+rQ)r(r)s"<22>r*r+r|<00>s<00><><00><16><16>e<EFBFBD><16><04>r-c<08><><00>VP'dVPpM^VP'dBVPP'd&VPPP 4pM \ R4h\ P!W!4R# \dpR\T49dhRp?R#Rp?ii;i)z/Unable to write to missing subprocess or stdin!z Broken pipeN)
r^r<>r<>r<>r<>rrr<>r<>rC)r:r<><00>fdr<64>s&& r*r-<00>Local._write_proc_stdin<69>s<><00><00> <10>><3E>><3E>><3E><15><1E><1E>B<EFBFBD> <11>\<5C>\<5C>\<5C>d<EFBFBD>l<EFBFBD>l<EFBFBD>0<>0<>0<><15><1C><1C>#<23>#<23>*<2A>*<2A>,<2C>B<EFBFBD>%<25>A<><0E> <0E>  <16> <0E>H<EFBFBD>H<EFBFBD>R<EFBFBD> <1E><><16> <16><1C>C<EFBFBD><01>F<EFBFBD>*<2A><15>+<2B><> <16>s<00>?B<00> B><03>"B9<03>9B>c<00><<01>V^8<>dQhRR/#r$r')r(r)s"<22>r*r+r|s<00><><00>
<0E>
<0E>$<24>
r-c<08><><00>VP'd \R4hVP'dCVPP'd'VPPP 4R#\R4h)z Cannot close stdin when pty=Truez,Unable to close missing subprocess or stdin!N)r^rr<>r<><00>closerys&r*r<><00>Local.close_proc_stdinsW<00><00> <0F>><3E>><3E>><3E>&<26>&H<>I<> I<> <11>\<5C>\<5C>\<5C>d<EFBFBD>l<EFBFBD>l<EFBFBD>0<>0<>0<> <10>L<EFBFBD>L<EFBFBD> <1E> <1E> $<24> $<24> &<26>%<25>><3E><0E> r-c<00>F<<01>V^8<>dQhRS[RS[RS[S[S[3,RR/#r:r;)r(r)s"<22>r*r+r|s1<00><><00>%<0E>%<0E>S<EFBFBD>%<0E><13>%<0E>4<EFBFBD><03>S<EFBFBD><08>><3E>%<0E>d<EFBFBD>%r-c
<08> <00>VP'd<>\fRp\P!V4\ 4wrV\P
!4wVnVnVP ^8Xdx\P!RWe^^4p\P!\PP4\PV4\ P"!W"RV.V4R#R#\%VRVV\&\&\&R7VnR#)NzKYou indicated pty=True, but your platform doesn't support the 'pty' module!<21>HHHHz-cT)rW<00>
executablerTrgrhr<>)r^rYr<><00>exitr<00>fork<72>pidr<64><00>struct<63>pack<63>fcntl<74>ioctlrgr<><00>termios<6F>
TIOCSWINSZr<00>execverrr<>)r:r?rWrTr<><00>cols<6C>rows<77>winsizes&&&& r*rl<00> Local.starts<><00><00> <0F>><3E>><3E>><3E><12>{<7B>c<><03><13><08><08><13> <0A>!<21><1A>J<EFBFBD>D<EFBFBD>'*<2A>x<EFBFBD>x<EFBFBD>z<EFBFBD> $<24>D<EFBFBD>H<EFBFBD>d<EFBFBD>n<EFBFBD><14>x<EFBFBD>x<EFBFBD>1<EFBFBD>}<7D>!<21>+<2B>+<2B>f<EFBFBD>d<EFBFBD>!<21>Q<EFBFBD>?<3F><07><15> <0B> <0B>C<EFBFBD>J<EFBFBD>J<EFBFBD>-<2D>-<2D>/<2F><17>1C<31>1C<31>W<EFBFBD>M<> <13> <09> <09>%<25><14>w<EFBFBD>!7<><13>=<3D>#<1D>&!<21><17><1A> <20><17><1B><1B><1A><0E>D<EFBFBD>Lr-c<00><<01>V^8<>dQhRR/#r$r')r(r)s"<22>r*r+r|Cs<00><><00><11><11>d<EFBFBD>r-c<08><><00>VP'd VPMVPPp\P!V\
P 4R# \dR#i;ir<>)r^r<>r<>rrB<00>signal<61>SIGKILL<4C>ProcessLookupError)r:r<>s& r*rB<00>
Local.killCsJ<00><00><1E>.<2E>.<2E>.<2E>d<EFBFBD>h<EFBFBD>h<EFBFBD>d<EFBFBD>l<EFBFBD>l<EFBFBD>.><3E>.><3E><03> <11> <0E>G<EFBFBD>G<EFBFBD>C<EFBFBD><16><1E><1E> (<28><>!<21> <11> <11> <11>s<00>%A<00> A,<03>+A,c<00> <<01>V^8<>dQhRS[/#r<>r)r(r)s"<22>r*r+r|Ms<00><><00> 3<> 3<>T<EFBFBD> 3r-c<08><><00>VP'd<\P!VP\P4wqnV^8g#VP P4RJ#r~)r^r<00>waitpidr<64><00>WNOHANGr<47>r<><00>poll)r:<00>pid_vals& r*r&<00>Local.process_is_finishedLsL<00><00> <0F>><3E>><3E>><3E>$&<26>:<3A>:<3A>d<EFBFBD>h<EFBFBD>h<EFBFBD><02>
<EFBFBD>
<EFBFBD>#C<> <20>G<EFBFBD>[<5B><1A>a<EFBFBD><<3C> <1F><17><<3C><<3C>$<24>$<24>&<26>d<EFBFBD>2<> 2r-c<00>0<<01>V^8<>dQhRS[S[,/#r<>r`)r(r)s"<22>r*r+r|[s<00><><00>+<2B>+<2B>H<EFBFBD>S<EFBFBD>M<EFBFBD>+r-c<08><><00>VP'd<>Rp\P!VP4'd#\P!VP4pV#\P
!VP4'd*\P !VP4pRV,pV#VPP#)N<><4E><EFBFBD><EFBFBD><EFBFBD>) r^r<00> WIFEXITEDr<44><00> WEXITSTATUS<55> WIFSIGNALED<45>WTERMSIGr<47>r<>)r:<00>codes& r*r<><00>Local.returncode[s<><00><00> <0F>><3E>><3E>><3E><18>D<EFBFBD><11>|<7C>|<7C>D<EFBFBD>K<EFBFBD>K<EFBFBD>(<28>(<28><19>~<7E>~<7E>d<EFBFBD>k<EFBFBD>k<EFBFBD>2<><04> <18>K<EFBFBD> <14><1E><1E><04> <0B> <0B>,<2C>,<2C><19>{<7B>{<7B>4<EFBFBD>;<3B>;<3B>/<2F><04><1A>D<EFBFBD>y<EFBFBD><04><17>K<EFBFBD><18><<3C><<3C>*<2A>*<2A> *r-c<00><<01>V^8<>dQhRR/#r$r')r(r)s"<22>r*r+r|ps<00><><00> <15> <15>d<EFBFBD> r-c<08><><<01>\SV`4VP'd$\P!VP
4R#R# \ dR#i;ir<>)rrFr^rr<>r<><00> Exception)r:r2s&<26>r*rF<00>
Local.stoppsG<00><><00> <0A><07> <0C><0E> <10>><3E>><3E>><3E> <15><12><08><08><14><1E><1E>(<28> <1A><><1D> <15><15> <15>s<00> A<00> A<03>A)r<>r<>r<>r<>r5)FT)rorprqrrrsr;r<>r<>r<>r-r<>rlrBrtr&r<>rFrvrw<00> __classcell__)r2r)s@@r*rzrz<00>s<><00><><00><00><08> <18><18>
<17> <17><14><14>6<14><14><16><16>(
<0E>
<0E>%<0E>%<0E>N<11><11><0E> 3<><0E> 3<>+<2B>+<2B>* <15> <15> r-rzc
<00><>a<00>]tRtRtoRtRRRRRR^R]!43 V3RlRllt]V3RlR l4tV3R
lR lt V3R lR lt
V3RlRlt ]V3RlRl4t ]V3RlRl4t RV3RlRlltRtVtR#)rAi~a"
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 process
was invoked via a pty, in which case it will be empty; see
`.Runner.run`.)
:param str encoding:
The string encoding used by the local shell environment.
:param str command:
The command which was executed.
:param str shell:
The shell binary used for execution.
:param dict env:
The shell environment used for execution. (Default is the empty dict,
``{}``, not ``None`` as displayed in the signature.)
:param int exited:
An integer representing the subprocess' exit/return code.
.. note::
This may be ``None`` in situations where the subprocess did not run
to completion, such as when auto-responding failed or a timeout was
reached.
:param bool pty:
A boolean describing whether the subprocess was invoked with a pty or
not; see `.Runner.run`.
:param tuple hide:
A tuple of stream names (none, one or both of ``('stdout', 'stderr')``)
which were hidden from the user when the generating command executed;
this is a normalized value derived from the ``hide`` parameter of
`.Runner.run`.
For example, ``run('command', hide='stdout')`` will yield a `Result`
where ``result.hide == ('stdout',)``; ``hide=True`` or ``hide='both'``
results in ``result.hide == ('stdout', 'stderr')``; and ``hide=False``
(the default) generates ``result.hide == ()`` (the empty tuple.)
.. note::
`Result` objects' truth evaluation is equivalent to their `.ok`
attribute's value. Therefore, quick-and-dirty expressions like the
following are possible::
if run("some shell command"):
do_something()
else:
handle_problem()
However, remember `Zen of Python #2
<http://zen-of-python.info/explicit-is-better-than-implicit.html#2>`_.
.. versionadded:: 1.0
reNFc<00><><<01>V^8<>dQhRS[RS[RS[S[,RS[RS[RS[S[S[S[3,,RS[RS[R S[S[R
3,/ #) r$rgrhrVr?rWrTrirYrX.)rCr r rr<>r<>r)r(r)s"<22>r*r+<00>Result.__annotate__<5F>s~<00><><00><19><19><13><19><14><19><1B>3<EFBFBD>-<2D> <19>
<15> <19> <13> <19><16>d<EFBFBD>3<EFBFBD><03>8<EFBFBD>n<EFBFBD> %<25><19><14><19><12><19><14>C<EFBFBD><13>H<EFBFBD>o<EFBFBD>r-c
<08><><00>WnW nVf \4pW0nW@nWPnVf/MTVnWpnW<>nW<>n R#r<>)
rgrhr\rVr?rWrTrirYrX)
r:rgrhrVr?rWrTrirYrXs
&&&&&&&&&&r*r;<00>Result.__init__<5F>sG<00><00><1D> <0B><1C> <0B> <13> <1B>'<27>)<29>H<EFBFBD> <20> <0A><1E> <0C><1A>
<EFBFBD><1C><1B>2<EFBFBD>#<23><04><08><1C> <0B><16><08><18> r-c<00> <<01>V^8<>dQhRS[/#r<>r?)r(r)s"<22>r*r+r<><00>s<00><><00><1B><1B>S<EFBFBD>r-c <0C><00>VP#)z2
An alias for ``.exited``.
.. versionadded:: 1.0
)rirys&r*<00> return_code<64>Result.return_code<64>s<00><00><14>{<7B>{<7B>r-c<00> <<01>V^8<>dQhRS[/#r<>r)r(r)s"<22>r*r+r<><00>s<00><><00><17><17>$<24>r-c<08><00>VP#r<><00><01>okrys&r*<00>__bool__<5F>Result.__bool__<5F>s <00><00><13>w<EFBFBD>w<EFBFBD>r-c<00> <<01>V^8<>dQhRS[/#r<>rK)r(r)s"<22>r*r+r<><00>s<00><><00><1E><1E><13>r-c<08>8<00>VPeRPVP4pMRpV.pRFUp\W4pTPV'd RPW4P 44MRPV44KW RP V4#)NzCommand exited with status {}.z4Command was not fully executed due to watcher error.z=== {} ===
{}
z(no {})r<>)rgrh)rir(<00>getattrr<72><00>rstripr<70>)r:<00>desc<73>retr<00>vals& r*<00>__str__<5F>Result.__str__<5F>s<><00><00> <0F>;<3B>;<3B> "<22>3<>:<3A>:<3A>4<EFBFBD>;<3B>;<3B>G<>D<EFBFBD>I<>D<EFBFBD><13>f<EFBFBD><03>%<25>A<EFBFBD><19>$<24>"<22>C<EFBFBD> <0F>J<EFBFBD>J<EFBFBD> <17> <04>
<EFBFBD>F<EFBFBD><15>z<EFBFBD>z<EFBFBD>|<7C><12><1F>%<25>%<25>a<EFBFBD>(<28> <0E>&<26><14>y<EFBFBD>y<EFBFBD><13>~<7E>r-c<00> <<01>V^8<>dQhRS[/#r<>rK)r(r)s"<22>r*r+r<><00>s<00><><00>:<3A>:<3A>#<23>:r-c<08>R<00>RpVPVPVP4#)z<Result cmd={!r} exited={}>)r(r?ri)r:<00>templates& r*<00>__repr__<5F>Result.__repr__<5F>s"<00><00>1<><08><17><EFBFBD><EFBFBD>t<EFBFBD>|<7C>|<7C>T<EFBFBD>[<5B>[<5B>9<>9r-c<00> <<01>V^8<>dQhRS[/#r<>r)r(r)s"<22>r*r+r<>s<00><><00>&<26>&<26>D<EFBFBD>&r-c <0C>2<00>\VP^8H4#)zA
A boolean equivalent to ``exited == 0``.
.. versionadded:: 1.0
)r<>rirys&r*r<><00> Result.ok<6F>s<00><00><14>D<EFBFBD>K<EFBFBD>K<EFBFBD>1<EFBFBD>$<24>%<25>%r-c<00> <<01>V^8<>dQhRS[/#r<>r)r(r)s"<22>r*r+r<> s<00><><00> <1B> <1B><04> r-c <0C>$<00>VP'*#)z<>
The inverse of ``ok``.
I.e., ``True`` if the program exited with a nonzero return code, and
``False`` otherwise.
.. versionadded:: 1.0
r<EFBFBD>rys&r*<00>failed<65> Result.faileds<00><00><18>7<EFBFBD>7<EFBFBD>{<7B>r-c<00>,<<01>V^8<>dQhRS[RS[RS[/#)r$r<><00>countr&)rCr<>)r(r)s"<22>r*r+r<>s'<00><><00>O<01>O<01>3<EFBFBD>O<01>s<EFBFBD>O<01>C<EFBFBD>Or-c <0C>h<00>RRP\W4P4V)R4,#)z<>
Return the last ``count`` lines of ``stream``, plus leading whitespace.
:param str stream:
Name of some captured stream attribute, eg ``"stdout"``.
:param int count:
Number of lines to preserve.
.. versionadded:: 1.3
z
r<EFBFBD>N)r<>r<><00>
splitlines)r:r<>r<>s&&&r*<00>tail<69> Result.tails/<00><00><16><04> <09> <09>'<27>$<24>"7<>"B<>"B<>"D<>e<EFBFBD>V<EFBFBD>W<EFBFBD>"M<>N<>N<>Nr-) r?rVrTrirXrYrWrhrg)<01>
)rorprqrrrs<00>tupler;rtr<>r<>r<>r<>r<>r<>r<>rvrwrxs@r*rArA~s<><00><><00><00>?<08>H<19><18>"&<26><19><17>(,<2C><17><19> %<25><07><19><19>0<0E><1B><0E><1B><17><17><1E><1E>&:<3A>:<3A><0E>&<26><0E>&<26><0E> <1B><0E> <1B>O<01>O<01>Or-rAc<00>la<00>]tRtRtoRtV3RlRltV3RlRltV3RlRltV3R lR
ltR t Vt
R #) rwi%a 
A promise of some future `Result`, yielded from asynchronous execution.
This class' primary API member is `join`; instances may also be used as
context managers, which will automatically call `join` when the block
exits. In such cases, the context manager yields ``self``.
`Promise` also exposes copies of many `Result` attributes, specifically
those that derive from `~Runner.run` kwargs and not the result of command
execution. For example, ``command`` is replicated here, but ``stdout`` is
not.
.. versionadded:: 1.4
c<00>"<<01>V^8<>dQhRRRR/#)r$<00>runnerr!r&Nr')r(r)s"<22>r*r+<00>Promise.__annotate__5s<00><><00> &<26> &<26>x<EFBFBD> &<26>D<EFBFBD> &r-c <0C><><00>WnVPPP4Fwr#\WV4K R#)z<>
Create a new promise.
:param runner:
An in-flight `Runner` instance making this promise.
Must already have started the subprocess and spun up IO threads.
N)r<>r_r<><00>setattr)r:r<>r<>r<>s&& r*r;<00>Promise.__init__5s4<00><00><1D> <0B><1F>+<2B>+<2B>3<>3<>9<>9<>;<3B>J<EFBFBD>C<EFBFBD> <13>D<EFBFBD>u<EFBFBD> %<25><r-c<00> <<01>V^8<>dQhRS[/#r<>r<>)r(r)s"<22>r*r+r<>Ds<00><><00><1F><1F>f<EFBFBD>r-c <0C><><00>VPP4VPP4# TPP4i;i)a 
Block until associated subprocess exits, returning/raising the result.
This acts identically to the end of a synchronously executed ``run``,
namely that:
- various background threads (such as IO workers) are themselves
joined;
- if the subprocess exited normally, a `Result` is returned;
- in any other case (unforeseen exceptions, IO sub-thread
`.ThreadException`, `.Failure`, `.WatcherError`) the relevant
exception is raised here.
See `~Runner.run` docs, or those of the relevant classes, for further
details.
)r<>rrrFrys&r*r<><00> Promise.joinDs8<00><00>" <1F><17>;<3B>;<3B>&<26>&<26>(<28> <10>K<EFBFBD>K<EFBFBD> <1C> <1C> <1E><>D<EFBFBD>K<EFBFBD>K<EFBFBD> <1C> <1C> <1E>s <00>6<00>Ac<00><<01>V^8<>dQhRR/#rvr')r(r)s"<22>r*r+r<>Zs<00><><00><14><14>9<EFBFBD>r-c<08><00>V#r<>r'rys&r*<00> __enter__<5F>Promise.__enter__Zs<00><00><13> r-c<00>`<<01>V^8<>dQhRS[S[S[,,RS[RS[S[,RR/#)r$<00>exc_type<70> exc_value<75>exc_tbr&N)r r<00> BaseExceptionr)r(r)s"<22>r*r+r<>]sB<00><><00><14><14><1A>4<EFBFBD> <0A>.<2E>/<2F><14>!<21><14><19><1D>'<27> <14>
<0E> r-c<08>&<00>VP4R#r<>)r<>)r:rrrs&&&&r*<00>__exit__<5F>Promise.__exit__]s <00><00> <0A> <09> <09> r-)r<>N) rorprqrrrsr;r<>rr
rvrwrxs@r*rwrw%s2<00><><00><00> <08> &<26> &<26><1F><1F>,<14><14><14>r-rwc
<00><><00>V^8<>dQhR\R\\,R\\,R\\R3,/#)r$r<>r<>r<>r&.)rr rCr)r(s"r*r+r+fs@<00><00><17><17> <0C><17><18><13> <0A><17><19><13> <0A><17> <0B>3<EFBFBD><03>8<EFBFBD>_<EFBFBD> r-c<00>.<00>RpW9dRp\VPW44hVR9d.pM%VR9dRR.pMVR8XdR.pMVR8XdR.pMV.pVeRV9dVPR4VeRV9dVPR4\V4#) Nr<4E>rgr<>rhz$'hide' got {!r} which is not in {!r})NFr<46>rgr<>rh<00>bothT)NF)rT)r<>r(<00>remover<65>)r<>r<>r<><00> hide_valsr<73>rXs&&& r*r<>r<>fs<><00><00> N<01>I<EFBFBD>
<EFBFBD><1B>4<><03><18><13><1A><1A>C<EFBFBD>3<>4<>4<>
<EFBFBD>m<EFBFBD><1B><11><04> <0C><0E> <1E><18>(<28>#<23><04> <0C><05><1C><18>z<EFBFBD><04> <0C><05><1C><18>z<EFBFBD><04><13>u<EFBFBD><04><11><1D>(<28>d<EFBFBD>"2<> <0C> <0B> <0B>H<EFBFBD><1D><11><1D>(<28>d<EFBFBD>"2<> <0C> <0B> <0B>H<EFBFBD><1D> <10><14>;<3B>r-c<00>$<00>V^8<>dQhR\/#r<>rK)r(s"r*r+r+<00>s<00><00> <14> <14>#<23> r-c<04>2<00>\P!R4pV#)z<>
Obtain apparent interpreter-local default text encoding.
Often used as a baseline in situations where we must use SOME encoding for
unknown-but-presumably-text bytes, and the user has not specified an
override.
F)<02>locale<6C>getpreferredencoding)rVs r*r\r\<00>s<00><00><16>*<2A>*<2A>5<EFBFBD>1<>H<EFBFBD> <13>Or-)NN)7r<37>rrr<>r<>r/rr<><00>
subprocessrr<00>typesr<00>typingrrrr r
r r r rrrY<00> ImportErrorr<72>r<><00>
exceptionsrrrrrr<00> terminalsrrrrr<00>utilrrrr%rr6rr!rzrArwr<>r\r'r-r*<00><module>rs<><00><01> <0C> <0A> <09> <0A>
<EFBFBD><10> <0B> <0A>"<22><1F> <02> <02> <02><0F><0E><11><10><13><12><02><02><02><02>><3E>=<3D><10> <20>'<27>w@<01>w@<01>t#D<15>F<EFBFBD>D<15>NdO<01>dO<01>N><14>f<EFBFBD>><14>B<17>8 <14><>M3<13><0F>
<0E>C<EFBFBD><0F><><13><11> <10>E<EFBFBD><11><><13><13><12>G<EFBFBD><13>s6<00>C <00> C<00>C*<00> C<03>C<03> C'<03>&C'<03>* C6<03>5C6