Files
952-11/env/python/dll/Python312/Lib/__pycache__/subprocess.cpython-312.pyc
T

523 lines
77 KiB
Plaintext
Raw Normal View History

2024-08-19 17:05:14 +08:00
Ë
*åf=cãó´—dZddlZddlZddlZddlZddlZddlZddlZddlZddl Z ddl
Z
ddl Z ddlm Z
ddlZ ddlZgd¢Z ddlZdZej*dvZer@ddlZddlmZmZmZmZmZmZmZmZm Z m!Z!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)ejUgd ¢«nYerCdd
l+m,Z-ej\Z/ej`Z1ejdZ3ejhZ5ejlZ7n dZ-dZ/dZ1dZ3dZ5dZ7ddl8Z8ddl9Z9Gd „d e:«Z;Gd
„de;«Z<Gd„de;«Z=erGd„d«Z>Gd„de?«Z@n,eAe8dd«ZBeCe9d«r
e9jˆZEn e9jŒZEerdZGd„ZHngZGd„ZHdZIdZJdZKd„ZLd„ZMd„ZNdd œd!„ZOd"„ZPdd œd#„ZQGd$„d%eR«ZSddddd&œd'„ZTd(„ZUddd)œd*„ZVddd)œd+„ZWd,„ZXeX«ZYdZZGd-„d.«Z[y#e$rdZY�ŒŠwxYw#e$rdZY�Œ�wxYw)/a•Subprocesses with accessible I/O streams
This module allows you to spawn processes, connect to their
input/output/error pipes, and obtain their return codes.
For a complete description of this module see the Python documentation.
Main API
========
run(...): Runs a command, waits for it to complete, then returns a
CompletedProcess instance.
Popen(...): A class for flexibly executing a command in a new process
Constants
---------
DEVNULL: Special value that indicates that os.devnull should be used
PIPE: Special value that indicates a pipe should be created
STDOUT: Special value that indicates that stderr should go to stdout
Older API
=========
call(...): Runs a command, waits for it to complete, then returns
the return code.
check_call(...): Same as call() but raises CalledProcessError()
if return code is not 0
check_output(...): Same as check_call() but returns the contents of
stdout instead of a return code
getoutput(...): Runs a command in the shell, waits for it to complete,
then returns the output
getstatusoutput(...): Runs a command in the shell, waits for it to complete,
then returns a (exitcode, output) tuple
éN)Ú monotonic)ÚPopenÚPIPEÚSTDOUTÚcallÚ
check_callÚgetstatusoutputÚ getoutputÚ check_outputÚrunÚCalledProcessErrorÚDEVNULLÚSubprocessErrorÚTimeoutExpiredÚCompletedProcessTF>ÚwasiÚ
emscripten)ÚCREATE_NEW_CONSOLEÚCREATE_NEW_PROCESS_GROUPÚSTD_INPUT_HANDLEÚSTD_OUTPUT_HANDLEÚSTD_ERROR_HANDLEÚSW_HIDEÚSTARTF_USESTDHANDLESÚSTARTF_USESHOWWINDOWÚABOVE_NORMAL_PRIORITY_CLASSÚBELOW_NORMAL_PRIORITY_CLASSÚHIGH_PRIORITY_CLASSÚIDLE_PRIORITY_CLASSÚNORMAL_PRIORITY_CLASSÚREALTIME_PRIORITY_CLASSÚCREATE_NO_WINDOWÚDETACHED_PROCESSÚCREATE_DEFAULT_ERROR_MODEÚCREATE_BREAKAWAY_FROM_JOB)rrrrrrrrÚ STARTUPINFOrrrrr r!r"r#r$r%)Ú fork_execcó —eZdZy)rN)Ú__name__Ú
__module__Ú __qualname__©óúFC:\Users\RCi\AppData\Local\Programs\Python\Python312\Lib\subprocess.pyrr{s…r-rcóR—eZdZdZdd„Zd„Zed„«Zejd„«Zy)r
z£Raised when run() is called with check=True and the process
returns a non-zero exit status.
Attributes:
cmd, returncode, stdout, stderr, output
Ncó<—||_||_||_||_y©N)Ú
returncodeÚcmdÚoutputÚstderr)Úselfr2r3r4r5s r.Ú__init__zCalledProcessError.__init__…s€Ø$ˆŒØˆŒØˆŒ ؈� r-có&—|jr@|jdkr1d|j›dtj|j «›d�Sd|j|jfzS#t$rd|j|j fzcYSwxYw)Nrú Command 'z ' died with ú.z)Command '%s' died with unknown signal %d.z.Command '%s' returned non-zero exit status %d.)r2r3ÚsignalÚSignalsÚ
ValueError©r6s r.Ú__str__zCalledProcessError.__str__‹s•€Ø �?Š?˜tŸ™°Ò2ð
4àŸ›¤&§.¡.°$·/±/Ð1AÕ"BðDðDð DØ—H‘H˜dŸo™oðG/ñ/ð
/øô ò
4ØBØŸ™ 4§?¡?Ð"2ðF4ñ4ò4ð
4úsœ0A(Á(%BÂBcó—|jS)z+Alias for output attribute, to match stderr©r4r>s r.ÚstdoutzCalledProcessError.stdout—s€ð�{‰{Ðr-có—||_yr1rA©r6Úvalues r.rBzCalledProcessError.stdoutœó €ðˆ� r-©NN© r)r*r+Ú__doc__r7r?ÚpropertyrBÚsetterr,r-r.r
r
~s=„ñó ò
/ðñóðð ‡]�]ñóñr-r
cóR—eZdZdZdd„Zd„Zed„«Zejd„«Zy)rz›This exception is raised when the timeout expires while waiting for a
child process.
Attributes:
cmd, output, stdout, stderr, timeout
Ncó<—||_||_||_||_yr1)r3Útimeoutr4r5)r6r3rNr4r5s r.r7zTimeoutExpired.__init__ªs€ØˆŒØˆŒ ؈Œ ؈� r-có<—d|j›d|j›d�S)Nr9z' timed out after z seconds)r3rNr>s r.r?zTimeoutExpired.__str__°s�à—“˜4Ÿ<›<ð)ð *r-có—|jSr1rAr>s r.rBzTimeoutExpired.stdout´s €à�{‰{Ðr-có—||_yr1rArDs r.rBzTimeoutExpired.stdout¸rFr-rGrHr,r-r.rr£s=„ñó ò *ðñóðð ‡]�]ñóñr-rcó(—eZdZdddddddœd„Zd„Zy)r&rN©ÚdwFlagsÚ hStdInputÚ
hStdOutputÚ hStdErrorÚ wShowWindowÚlpAttributeListcód—||_||_||_||_||_|xsdgi|_y)NÚ handle_listrS)r6rTrUrVrWrXrYs r.r7zSTARTUPINFO.__init__Ás8€à"ˆDŒLØ&ˆDŒNØ(ˆDŒOØ&ˆDŒNØ*ˆDÔ Ø#2Ò#I°}ÀbÐ6IˆDÕ r-cóæ—|jj«}d|vrt|d«|d<t|j|j
|j |j|j|¬«S)Nr[rS) rYÚcopyÚlistr&rTrUrVrWrX)r6Ú attr_lists r.r]zSTARTUPINFO.copyÊsf€Ø×,Ñ,×1Ñ1Ó3ˆIØ  Ñ)Ü+/° ¸-Ñ0HÓ+I� ˜-Ñ(ä t§|¡|Ø)-¯©Ø*.¯/©/Ø)-¯©Ø+/×+;Ñ+;Ø/8ô :ð
:r-)r)r*r+r7r]r,r-r.r&r&Às„Ø&'°4ÀDØ#°ÀDô Jó
:r-r&có>—eZdZdZej
fd„Zd„Zd„ZeZ y)ÚHandleFcó<—|jsd|_||«yy)NT)Úclosed)r6Ú CloseHandles r.ÚClosez Handle.CloseÚs€Ø—;’;Ø"�” Ù˜DÕ!ðr-cóT—|jsd|_t|«Std«‚)NTzalready closed)rcÚintr=r>s r.ÚDetachz
Handle.Detachßs&€Ø—;’;Ø"�” ܘ4“yÐ ÜÐ-Ó.Ð .r-cóJ—d|jjt|«fzS)Nz%s(%d))Ú __class__r)rgr>s r.Ú__repr__zHandle.__repr__ås €Ø˜tŸ~™~×6Ñ6¼¸D» ÐBÑBÐ Br-N)
r)r*r+rcÚ_winapirdrerhrkÚ__del__r,r-r.rara×s'„؈à$+×$7Ñ$7ó "ò
 /ò  Cð‰r-raÚPIPE_BUFiÚ PollSelectorcó—yr1r,r,r-r.Ú_cleanuprqs€Ø r-có¾—t€ytddD];}|jtj¬«}|€Œ& tj |«Œ=y#t
$rYŒJwxYw)N©Ú
_deadstate)Ú_activeÚ_internal_pollÚsysÚmaxsizeÚremover=)ÚinstÚress r.rqrq s`€Ü ˆ?Ø Ü™A�Jò ˆDØ×%Ñ%´·±Ð%Ó=ˆC؉ðÜ—N‘N 4Õ(ñ  øô
"òñðús¸AÁ AÁAéÿÿÿÿéþÿÿÿéýÿÿÿcóv—g}tjj}|dkDr|jdd|zz«|S)zgReturn a list of command-line arguments reproducing the current
optimization settings in sys.flags.rú-ÚO)rwÚflagsÚoptimizeÚappend)ÚargsrEs r.Ú"_optim_args_from_interpreter_flagsr†"s9€ð €DÜ �I‰I× Ñ €EØ ˆq‚yØ � ‰ �C˜# ™+Ñ%Ô&Ø €Kr-có—dddddddœ}t«}|j«D]<\}}ttj|«}|dkDsŒ&|j d ||zz«Œ>tjj r|j d
«n�tjjr|j d «tjjr|j d «tjjr|j d
«tjdd}ttdi«}tjj}tjj}|dkDr|jd«n|r|jd«|r|jd«|D]}|j d|z«Œ|r|jd«dD]-}||vsŒ||} | dur|}
n|›d| ›�}
|jd|
f«Œ/|S)z}Return a list of command-line arguments reproducing the current
settings in sys.flags, sys.warnoptions and sys._xoptions.ÚdÚBÚSÚvÚbÚq)ÚdebugÚdont_write_bytecodeÚno_siteÚverboseÚ
bytes_warningÚquietrr€z-Iz-Ez-sz-PNÚ _xoptionsézerror::BytesWarningzdefault::BytesWarningÚdefaultz-W)ú-XÚdev)Ú faulthandlerÚ tracemallocÚ
importtimeÚfrozen_modulesÚ showrefcountÚutf8Tú=r—)r†ÚitemsÚgetattrrwr‚r„ÚisolatedÚignore_environmentÚ no_user_siteÚ safe_pathÚ warnoptionsr’Údev_moderyÚextend) Ú flag_opt_mapr…ÚflagÚoptr‹ÚwarnoptsÚxoptionsr’r§rEÚargs r.Ú_args_from_interpreter_flagsr¯,sÄ€ðð #ØØØØñ
€Lô .Ó /€DØ!×'Ñ'Ó)ò'‰ ˆˆcÜ ”C—I‘I˜tÓ $ˆØ ˆq‹5Ø �K‰K˜˜c A™g™
Õ &ð'ô
 ‡y�y×ÒØ � ‰ �DÕä �9‰9× 'Ò 'Ø �K‰K˜Ô Ü �9‰9× !Ò !Ø �K‰K˜Ô Ü �9‰9× Ò Ø �K‰K˜Ô ô�‰™qÐ!€HÜ”s˜K¨Ó,€HÜ—I‘I×+Ñ+€MÜ�y‰y×!Ñ!€Hà�qÒØ�‰Ð-Õ.Ù Ø�‰Ð/Ô0ÙØ�‰˜ Ô"Øò ˆØ � ‰ �D˜3‘JÕð ñØ � ‰ �MÔ"ð:ò%ˆà �(Š?ؘS‘MˆEؘ‰}Ø‘â!$¡eÐ,�Ø �K‰K˜˜s˜ Õ $ð%ð €Kr-cóš—tjjrƒtj«}|jj
}d}|j x}r.|jj
|k7rn|dz
}|j x}rŒ.tjdt|«tjjrytj«S)Nér•z"'encoding' argument not specified.zutf-8)
rwr‚Úwarn_default_encodingÚ _getframeÚf_codeÚ co_filenameÚf_backÚwarningsÚwarnÚEncodingWarningÚ utf8_modeÚlocaleÚ getencoding)ÚfÚfilenameÚ
stacklevels r.Ú_text_encodingrÀis¡€ô ‡y�y×&Ò&Ü �M‰M‹OˆØ—8‘8×'Ñ'ˆØˆ
Ø—8‘8ˆmˆaˆmØ�x‰x×#Ñ# xÒ/ØØ ˜!‰OˆJð—8‘8ˆmˆa‰mô �
‰
Ð:Ü% zô 3ô ‡y�y×ÒØä×!Ñ!Ó#Ð#r-©rNcó–—t|i|¤Ž5} |j|¬«cddd«S#|j«‚xYw#1swYyxYw)zÞRun command with arguments. Wait for command to complete or
timeout, then return the returncode attribute.
The arguments are the same as for the Popen constructor. Example:
retcode = call(["ls", "-l"])
rÁN)rÚwaitÚkill)rNÚ popenargsÚkwargsÚps r.rr}sS€ô
� Ð $˜VÑ $ð¨ð Ø—6‘6 '�6Ó*÷ñøð Ø
�F‰FŒHà ú÷
ðúsŒ?Ž)©<¼?¿Acóf—t|i|¤Ž}|r$|jd«}|€|d}t||«‚y)aORun command with arguments. Wait for command to complete. If
the exit code was zero then return, otherwise raise
CalledProcessError. The CalledProcessError object will have the
return code in the returncode attribute.
The arguments are the same as for the call function. Example:
check_call(["ls", "-l"])
r…r)rÚgetr
)rÅrÆÚretcoder3s r.rrŽsB€ô�IÐ( Ñ(€GÙØ�j‰j˜Ó ˆØ ˆ;ؘA‘,ˆCÜ  ¨#Ó.Ð.Ø r-có—dD]}||vsŒt|›d�«‚d|vrS|d€N|jd«s3|jd«s"|jd«s|jd«rd}nd }||d<t|t|d
d œ|¤ŽjS) aRun command with arguments and return its output.
If the exit code was non-zero it raises a CalledProcessError. The
CalledProcessError object will have the return code in the returncode
attribute and output in the output attribute.
The arguments are the same as for the Popen constructor. Example:
>>> check_output(["ls", "-l", "/dev/null"])
b'crw-rw-rw- 1 root root 1, 3 Oct 18 2007 /dev/null\n'
The stdout argument is not allowed as it is used internally.
To capture standard error in the result, use stderr=STDOUT.
>>> check_output(["/bin/sh", "-c",
... "ls -l non_existent_file ; exit 0"],
... stderr=STDOUT)
b'ls: non_existent_file: No such file or directory\n'
There is an additional optional argument, "input", allowing you to
pass a string to the subprocess's stdin. If you use this argument
you may not also use the Popen constructor's "stdin" argument, as
it too will be used internally. Example:
>>> check_output(["sed", "-e", "s/foo/bar/"],
... input=b"when in the course of fooman events\n")
b'when in the course of barman events\n'
By default, all communication is in bytes, and therefore any "input"
should be bytes, and the return value will be bytes. If in text mode,
any "input" should be a string, and the return value will be a string
decoded according to locale encoding, or by "encoding" if set. Text mode
is triggered by setting any of text, encoding, errors or universal_newlines.
)rBÚcheckz- argument not allowed, it will be overridden.ÚinputÚuniversal_newlinesÚtextÚencodingÚerrorsÚr-T)rBrNrÌ)r=rÉr rrB)rNrÅrÆÚkwÚemptys r.r r ¡sª€ðF"òSˆØ
�Š<Ü ˜tÐ#PÐQÓRÐ RðSð�&јV G™_Ð4ð �:‰:Ð*Ô +¨v¯z©z¸&Ô/AÀVÇZÁZÐPZÔE[Ø—:‘:˜hÔ'؉EàˆE؈ˆw‰ä � ¤$°¸tñ Øñ ß™ð r-cóH—eZdZdZdd„Zd„Zeej«Z d„Z
y)raEA process that has finished running.
This is returned by run().
Attributes:
args: The list or str args passed to run().
returncode: The exit code of the process, negative for signals.
stdout: The standard output (None if not captured).
stderr: The standard error (None if not captured).
Ncó<—||_||_||_||_yr1)r…r2rBr5)r6r…r2rBr5s r.r7zCompletedProcess.__init__ás€ØˆŒ Ø$ˆŒØˆŒ ؈� r-có®—dj|j«dj|j«g}|j�*|j dj|j««|j
�*|j dj|j
««djt
|«jdj|««S)Nz args={!r}zreturncode={!r}z stdout={!r}z stderr={!r}z{}({})z, ) Úformatr…r2rBr„r5Útyper)Újoin)r6r…s r.rkzCompletedProcess.__repr__çsš€Ø×"Ñ" 4§9¡9Ó-Ø!×(Ñ(¨¯©Ó9ð;ˆà �;‰;Ð "Ø �K‰K˜
×,Ñ,¨T¯[©[Ó9Ô :Ø �;‰;Ð "Ø �K‰K˜
×,Ñ,¨T¯[©[Ó9Ô :Ø�‰œt D›z×2Ñ2°D·I±I¸d³OÓDÐDr-cóˆ—|jr6t|j|j|j|j«‚y)z6Raise CalledProcessError if the exit code is non-zero.N)r2r
r…rBr5r>s r.Úcheck_returncodez!CompletedProcess.check_returncodeós4€à �?Š?Ü$ T§_¡_°d·i±iÀÇÁØ%)§[¡[ó2ð
2ð r-rG) r)r*r+rIr7rkÚ classmethodÚtypesÚ GenericAliasÚ__class_getitem__rÜr,r-r.rrÖs*„ñ óò Eñ$ E×$6Ñ$6Ó7Ðó2r-r)rÍÚcapture_outputrNrÌcó˜—|�%|jd«� td«‚t|d<|r?|jd«€|jd«� td«‚t|d<t|d<t|i|¤Ž5} |j ||¬«\}}|j«}
|r|
rt|
|j||¬«‚ddd«tj
«S#t
$rJ} |j
«tr|j «\| _| _ ‚|j«‚d} ~ w|j
«‚xYw#1swYŒˆxYw) a|Run command with arguments and return a CompletedProcess instance.
The returned instance will have attributes args, returncode, stdout and
stderr. By default, stdout and stderr are not captured, and those attributes
will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them,
or pass capture_output=True to capture both.
If check is True and the exit code was non-zero, it raises a
CalledProcessError. The CalledProcessError object will have the return code
in the returncode attribute, and output & stderr attributes if those streams
were captured.
If timeout is given, and the process takes too long, a TimeoutExpired
exception will be raised.
There is an optional argument "input", allowing you to
pass bytes or a string to the subprocess's stdin. If you use this argument
you may not also use the Popen constructor's "stdin" argument, as
it will be used internally.
By default, all communication is in bytes, and therefore any "input" should
be bytes, and the stdout and stderr will be bytes. If in text mode, any
"input" should be a string, and stdout and stderr will be strings decoded
according to locale encoding, or by "encoding" if set. Text mode is
triggered by setting any of text, encoding, errors or universal_newlines.
The other arguments are the same as for the Popen constructor.
NÚstdinz/stdin and input arguments may not both be used.rBr5z@stdout and stderr arguments may not be used with capture_output.rÁ©r4r5)rÉr=rrÚ communicaterrÄÚ
_mswindowsrBr5rÃÚpollr
r…r) rÍrárNrÌrÅrÆÚprocessrBr5ÚexcrÊs r.r r úsU€ð<
ÐØ �:‰:�gÓ Ð *ÜÐNÓOÐ O܈ˆw‰áØ �:‰:�hÓ Ð +¨v¯z©z¸(Ó/CÐ/OÜð4ó5ð
5䈈xÑ܈ˆxÑä � Ð $˜VÑ $ðC¨ð Ø$×0Ñ0°ÀÐ0ÓH‰NˆF�Fð&—,‘,“.ˆÙ ‘WÜ$ W¨g¯l©lØ,2¸6ôCð
C÷/Cô2 ˜GŸL™L¨'°6¸6Ó BÐBøô-ò
Ø �L‰LŒNÝð *1×)<Ñ)<Ó)>Ñ&�”
˜CœJð
ð— ‘ ”Ø ûð Ø �L‰LŒNà ú÷)CðCús1Á4EÁ6C -Eà D=Ã"AD'Ä'D=Ä=EÅE cóB—g}d}ttj|«D]î}g}|r|jd«d|vxs d|vxs| }|r|jd«|D]x}|dk(r|j|«Œ|dk(r4|jdt |«zdz«g}|jd«ŒS|r|j |«g}|j|«Œz|r|j |«|sŒÍ|j |«|jd«Œðdj
|«S) a•
Translate a sequence of arguments into a command line
string, using the same rules as the MS C runtime:
1) Arguments are delimited by white space, which is either a
space or a tab.
2) A string surrounded by double quotation marks is
interpreted as a single argument, regardless of white space
contained within. A quoted string can be embedded in an
argument.
3) A double quotation mark preceded by a backslash is
interpreted as a literal double quotation mark.
4) Backslashes are interpreted literally, unless they
immediately precede a double quotation mark.
5) If backslashes immediately precede a double quotation mark,
every pair of backslashes is interpreted as a literal
backslash. If the number of backslashes is odd, the last
backslash escapes the next double quotation mark as
described in rule 3.
Fú ú ú"ú\r±z\"rÒ)ÚmapÚosÚfsdecoder„Úlenr¨rÚ)ÚseqÚresultÚ needquoter®Úbs_bufÚcs r.Ú list2cmdlinerø@s€ð<€FØ€IÜ”2—;‘; Ó$ò!ˆØˆñ Ø �M‰M˜#Ô à˜C�ZÒ< T¨S [Ò<¸°Wˆ Ù Ø �M‰M˜#Ô àò !ˆAØ�DŠyà—
‘
˜aÕ Ø�c’à—
‘
˜d¤S¨£[Ñ0°Ñ2Ô3Ø�Ø—
‘
˜eÕ$ñØ—M‘M &Ô)Ø�FØ—
‘
˜aÕ ð !ñ" Ø �M‰M˜&Ô !â Ø �M‰M˜&Ô !Ø �M‰M˜#Õ ðC!ðF �7‰7�6‹?Ðr-©rÐrÑcó°— t|ddt||¬«}d}|dddk(r|dd}||fS#t$r"}|j}|j}Yd}~Œ7d}~wwxYw)aöReturn (exitcode, output) of executing cmd in a shell.
Execute the string 'cmd' in a shell with 'check_output' and
return a 2-tuple (status, output). The locale encoding is used
to decode the output and process newlines.
A trailing newline is stripped from the output.
The exit status for the command can be interpreted
according to the rules for the function 'wait'. Example:
>>> import subprocess
>>> subprocess.getstatusoutput('ls /bin/ls')
(0, '/bin/ls')
>>> subprocess.getstatusoutput('cat /bin/junk')
(1, 'cat: /bin/junk: No such file or directory')
>>> subprocess.getstatusoutput('/bin/junk')
(127, 'sh: /bin/junk: not found')
>>> subprocess.getstatusoutput('/bin/kill $$')
(-15, '')
T)ÚshellrÏr5rÐrÑrNr|ú
)r rr
r4r2)r3rÐrÑÚdataÚexitcodeÚexs r.r r ‰sl€ð*!ܘC t°$¼vØ%-°fô>ˆàˆð ˆBˆC€y�DÒØ�C�RˆyˆØ �Tˆ>Ðøô ò!Ø�y‰yˆØ—=‘=�ûð!ús‚*ª A³AÁAcó$—t|||¬«dS)a%Return output (stdout or stderr) of executing cmd in a shell.
Like getstatusoutput(), except the exit status is ignored and the return
value is a string containing the command's output. Example:
>>> import subprocess
>>> subprocess.getoutput('ls /bin/ls')
'/bin/ls'
rùr•)r )r3rÐrÑs r.r
r
©s€ô ˜3¨¸&Ô AÀ!Ñ DÐDr-có —tsttd«sytjdvry tj
d«}|j
d¬«}t|«dk7rt‚|d }ttt|dj
d
«««}tjd k(r |d k(r|d
k\ryy#tttf$rYywxYw)a„Check if posix_spawn() can be used for subprocess.
subprocess requires a posix_spawn() implementation that properly reports
errors to the parent process, & sets errno on the following failures:
* Process attribute actions failed.
* File actions failed.
* exec() failed.
Prefer an implementation which can use vfork() in some cases for best
performance.
Ú posix_spawnF)ÚdarwinÚsunos5TÚCS_GNU_LIBC_VERSIONr•)Úmaxsplitr±rr:ÚlinuxÚglibc)r±é)ræÚhasattrrðrwÚplatformÚconfstrÚsplitròr=ÚtuplerïrgÚAttributeErrorÚOSError)ÚverÚpartsÚlibcÚversions r.Ú_use_posix_spawnr·sÄ€õœ¤ ]Ô3àä
‡|�|Ð+Ñ+ðð
Ü�j‰jÐ.Ó/ˆà— ‘  1� Ó%ˆÜ ˆu‹:˜Š?äÐ Ø�Q‰xˆÜœœC  q¡§¡°Ó!4Ó5Ó6ˆä �<‰<˜7Ò " t¨w¢¸7ÀgÒ;Mðð øô
œJ¬Ð 0ò
à ð ð 
ús¬BB6Â6C
à C
c ó:—eZdZdZdZ d-ddddddddddœ d„Zd„Zeej«Z
e d„«Z e jd „«Z d
„Zd „Zd „Zej$ej(fd
„Zd„Zd„Zd.d„Zd„Zd„Z d/d„Zd0d„Zd„Zej>d„«Z e!rDd„Z"d„Z#d„Z$d„Z%de&jNe&jPe&jRfd„Z*d„Z+d„Z,d„Z-d„Z.d „Z/e/Z0yd!„Z"d"„Z1d#„Z%e2e3e4fd$„Z5de6e7e8jrfd%„Z*d&„Z:d'„Z+d(„Z-d)„Z;d*„Z.d+„Z/d,„Z0y)1rar Execute a child program in a new process.
For a complete description of the arguments see the Python documentation.
Arguments:
args: A string, or a sequence of program arguments.
bufsize: supplied as the buffering argument to the open() function when
creating the stdin/stdout/stderr pipe file objects
executable: A replacement program to execute.
stdin, stdout and stderr: These specify the executed programs' standard
input, standard output and standard error file handles, respectively.
preexec_fn: (POSIX only) An object to be called in the child process
just before the child is executed.
close_fds: Controls closing or inheriting of file descriptors.
shell: If true, the command will be executed through the shell.
cwd: Sets the current directory before the child is executed.
env: Defines the environment variables for the new process.
text: If true, decode stdin, stdout and stderr using the given encoding
(if set) or the system default otherwise.
universal_newlines: Alias of text, provided for backwards compatibility.
startupinfo and creationflags (Windows only)
restore_signals (POSIX only)
start_new_session (POSIX only)
process_group (POSIX only)
group (POSIX only)
extra_groups (POSIX only)
user (POSIX only)
umask (POSIX only)
pass_fds (POSIX only)
encoding and errors: Text mode encoding and error handling to use for
file objects stdin, stdout and stderr.
Attributes:
stdin, stdout, stderr, pid, returncode
Fr|N) ÚuserÚgroupÚ extra_groupsrÐrÑrÏÚumaskÚpipesizeÚ
process_groupc óÊ
—ts+ttjtj
›d�«‚t
«tj«|_ d|_
d|_ |€d}t|t«s td«‚|€d}t|t«s td«‚tr
|�Ht!d«‚|r|st#j$dt&«d }|
� t!d
«‚|d k7r t!d «‚||_d|_d|_d|_d|_d|_||_||_||_|�$| �"t;| «t;|«k7r t=d
«‚|xs
|xs|xs| |_|j>r|€tA«x|_}d|_!d|_"|j>r |dk(rd }d}nd}|€d}d}|�•tGtHd«s t!d«‚t|tJ«r! d dl&}|jQ|«jR}n6t|t«r|}n#tdjUtW|«««‚|d krt!d|›�«‚d}|�ÝtGtHd«s t!d«‚t|tJ«r t!d«‚g}|D]†}t|tJ«r0 d dl&}|jY|jQ|«jR«ŒCt|t«r|jY|«ŒetdjUtW|«««‚|D]} | d ksŒ t!d| ›�«‚d}!|�}tGtHd«s t!d«‚t|tJ«r! d dl-}"|"j]|«j^}!nt|t«r|}!n td«‚|!d krt!d|!›�«‚|ja|||«\}#}$}%}&}'}(tr{|$dk7r$tcjd|$jg«d «}$|%dk7r$tcjd|%jg«d «}%|'dk7r$tcjd|'jg«d «}' |$dk7rQtijj|$d|«|_|j>r)tijl|j*d ||¬ «|_|%dk7rOtijj|%d!|«|_|j>r'tijl|j,||¬"«|_|'dk7rOtijj|'d!|«|_|j>r'tijl|j.||¬"«|_|jo||||||
| |
|| |#|$|%|&|'|(||||!|||«y#tN$r t!d«‚wxYw#tN$r t!d«‚wxYw#tN$r t!d«‚wxYw#tqd|j*|j,|j.f«D]"}) |)js«Œ#t$rYŒ wxYw|jDsÊg}*|ttk(r|*jY|#«|ttk(r|*jY|&«|ttk(r|*jY|(«tG|d#«r|*jY|jv«|*D]N}+ tr!t|+tx«r|+j{«ntIjr|+«ŒA#t$rYŒLwxYw‚xYw)$zCreate new Popen instance.z does not support processes.NFr|zbufsize must be an integerzpipesize must be an integerz0preexec_fn is not supported on Windows platformszpass_fds overriding close_fds.Tz2startupinfo is only supported on Windows platformsrz4creationflags is only supported on Windows platformszlCannot disambiguate when both text and universal_newlines are supplied but different. Pass one or the other.gÐ?r•Úsetregidz>The 'group' parameter is not supported on the current platformzHThe group parameter cannot be a string on systems without the grp modulez,Group must be a string or an integer, not {}z!Group ID cannot be negative, got Ú setgroupszEThe 'extra_groups' parameter is not supported on the current platformz#Groups must be a list, not a stringzIItems in extra_groups cannot be strings on systems without the grp modulez9Items in extra_groups must be a string or integer, not {}Úsetreuidz=The 'user' parameter is not supported on the current platformzGThe user parameter cannot be a string on systems without the pwd modulez#User must be a string or an integerz User ID cannot be negative, got Úwb)Ú
write_throughÚline_bufferingrÐrÑÚrbrùÚ_devnull)>Ú_can_fork_execrÚerrnoÚENOTSUPrwr rqÚ threadingÚLockÚ
_waitpid_lockÚ_inputÚ_communication_startedÚ
isinstancergÚ TypeErrorrær=r·r¸ÚRuntimeWarningr…rãrBr5Úpidr2rÐrÑrÚboolrÚ text_moderÀÚ_sigint_wait_secsÚ_closed_child_pipe_fdsr
rðÚstrÚgrpÚ ImportErrorÚgetgrnamÚgr_gidrØrÙr„ÚpwdÚgetpwnamÚpw_uidÚ _get_handlesÚmsvcrtÚopen_osfhandlerhÚioÚopenÚ
TextIOWrapperÚ_execute_childÚfilterÚcloserr%rare),r6r…ÚbufsizeÚ
executablerãrBr5Ú
preexec_fnÚ close_fdsrûÚcwdÚenvrÎÚ startupinfoÚ
creationflagsÚrestore_signalsÚstart_new_sessionÚpass_fdsrrrrÐrÑrÏrrrr#Úgidr7ÚgidsÚ extra_groupÚ gid_checkÚuidr;Úp2creadÚp2cwriteÚc2preadÚc2pwriteÚerrreadÚerrwriter½Úto_closeÚfds, r.r7zPopen.__init__'sü€õÜÜ—
‘
¤#§,¡, Ð/KÐLóð
ô Œ
ô 'Ÿ^™^Ó-ˆÔàˆŒ Ø&+ˆÔ#Ø ˆ?؈Gܘ'¤3Ô'ÜÐ8Ó9Ð 9à Р؈Hܘ(¤CÔ(ÜÐ9Ó:Ð :å ØÐ%Ü ð"-ó.ð.ñ¡ Ü—
‘
Ð>ÄÔOØ � ØÐ&Ü ð"-ó.ð.à Ò!Ü ð"-ó.ð.ðˆŒ ØˆŒ
؈Œ ؈Œ ؈ŒØˆŒØ ˆŒ
؈Œ Ø ˆŒ
ð
Ð Ð!3Ð!?ÜÐ'Ó(¬D°«JÒ6Ü!ð#FóGð
Gð"ÒI VÒI¨tÒIÐ7IˆŒØ �>Š>˜hÐ.Ü'5Ó'7Ð 7ˆDŒM˜Hð
"&ˆÔà&+ˆÔ#à �>Š>ؘ!Š|Ø!%�ð‘à!&�à Р؈MàˆØ Ð Üœ2˜zÔ*Ü ð"4ó5ð5ô˜E¤3Ô'ðJÛð
—l‘l 5Ó)×0Ñ0‘ܘE¤3Ô'Ø‘äÐ Nß!'¡¬¨U« Ó!4ó6ð6ð�QŠwÜ Ð#DÀSÀEÐ!JÓKÐKàˆØ Ð #Üœ2˜{Ô+Ü ð"EóFðFô˜L¬#Ô.Ü Ð!FÓGÐGàˆDØ+ò
@� ܘk¬3Ô/ð7Û"ð —K‘K § ¡ ¨[Ó 9× @Ñ @ÕAÜ  ¬SÔ1Ø—K‘K  Õ,ä#ð%9ç%+¡V¬D°Ó,=Ó%>ó@ð@ð
@ð&"ò
V� ؘq“=Ü$Ð'HÈÈ Ð%TÓUÐUð
VðˆØ Ð Üœ2˜zÔ*Ü ð"8ó9ð9ô˜D¤#Ô&ðJÛð—l‘l 4Ó(×/Ñ/‘ܘD¤#Ô&Ø‘äÐ EÓFÐFà�QŠwÜ Ð#CÀCÀ5Ð!IÓJÐJð&#×/Ñ/°°v¸vÓFñ ˆ�(Ø �(Ø �(õ ؘ2Š~Ü!×0Ñ0°·±Ó1BÀAÓF�ؘ"Š}Ü ×/Ñ/°·±Ó0@À!ÓD�ؘ"Š}Ü ×/Ñ/°·±Ó0@À!ÓD�ð6 ؘ2Š~ÜŸW™W X¨t°WÓ=�”
Ø—>’>Ü!#×!1Ñ!1°$·*±*ÈDØ+9Ø%-°fô">�D”Jð˜"Š}Ü Ÿg™g g¨t°WÓ=�” Ø—>’>Ü"$×"2Ñ"2°4·;±;Ø%-°fô#>�D”Kà˜"Š}Ü Ÿg™g g¨t°WÓ=�” Ø—>’>Ü"$×"2Ñ"2°4·;±;Ø%-°fô#>�D”Kð
× Ñ   j°*¸iØ (¨#¨sØ +¨]¸EØ '¨Ø '¨Ø '¨Ø /Ø # T¨3°Ø 1°=õ
Bøôo#òJÜ$ð&IóJðJðJûô8'ò7Ü(ð*6ó7ð7ð7ûô8#òJÜ$ð&IóJðJðJûðP ä˜D 4§:¡:¨t¯{©{¸D¿K¹KÐ"HÓIò
�ðØ—G‘G•IøÜòÙðúð
ð ×.Ò.Ø�ØœD’=Ø—O‘O GÔ,ØœT’>Ø—O‘O HÔ-ØœT’>Ø—O‘O HÔ-ܘ4 Ô,Ø—O‘O D§M¡MÔ2Ø"ò�BðÝ%¬*°R¼Ô*@ØŸH™H�JäŸH™H RœLùÜ"òÙðúð
ð
úszÇ"U/ÊVÍVÑ D%V7Õ/VÖVÖV4Ö72["×*W;×:["×; XØ["ØXØB ["Ú<[Û["Û [Û["Û[Û["cóš—d|jj›d|j›d|j›d�}t |«dkDr|dddz}|S)Nú<z: returncode: z args: ú>éPéLz...>)rjr)r2r…rò)r6Úobj_reprs r.rkzPopen.__repr__(s]€à�—‘×'Ñ'Ð(ð)ØŸ?™?Ð+¨7°4·9±9°-¸qð
Bð ô ˆx‹=˜2Ò Ø  �} vÑ-ˆH؈r-có—|jSr1)r3r>s r.rÎzPopen.universal_newlines3s€ð�~‰~Ðr-có$—t|«|_yr1)r2r3)r6rÎs r.rÎzPopen.universal_newlines9s€äÐ0Ó1ˆ�r-cój—|j||«}|jdd«jdd«S)Nz
rüú
)ÚdecodeÚreplace)r6rýrÐrÑs r.Ú_translate_newlineszPopen._translate_newlines=s0€Ø�{‰{˜8 VÓ,ˆØ�|‰|˜F DÓ)×1Ñ1°$¸Ó=Ð=r-có—|Sr1r,r>s r.Ú __enter__zPopen.__enter__As€Øˆ r-cóˆ—|jr|jj«|jr|jj« |jr|jj«|tk(r<|j
dkDr% |j
|j
¬«d|_yd|_y|j«y#t$r
Yd|_ywxYw#|tk(rF|j
dkDr- |j
|j
¬«n#t$rYnwxYwd|_Yy|j«wxYw)NrrÁ) rBrFr5rãÚKeyboardInterruptr4Ú_waitrrÃ)r6Úexc_typerEÚ tracebacks r.Ú__exit__zPopen.__exit__Ds€Ø �;Š;Ø �K‰K× Ñ Ô Ø �;Š;Ø �K‰K× Ñ Ô ð Ø�zŠzØ—
‘
× Ñ Ô"àÔ,Ò,ð×)Ñ)¨AÒ-ðØŸ
™
¨4×+AÑ+A˜
ÔBð*+�Ô&Øð*+�Ô&Øð
�I‰I�Køô
*òØØ)*�Ô&ØðûðÔ,Ò,ð×)Ñ)¨AÒ-ðØŸ
™
¨4×+AÑ+A˜
ÕBøÜ)òÙðúà)*�Ô&Úð
�I‰I�KúsHÁ&C Â
C
Ã
CÃCà EÃ:DÄEÄ D#Ä EÄ"D#Ä# EÄ0Ecóä—|jsy|j€|d|jzt|¬«|j |¬«|j€t
�t
j
|«yyy)Nzsubprocess %s is still running)Úsourcers)Ú_child_createdr2r1ÚResourceWarningrvrur„)r6Ú_maxsizeÚ_warns r.rmz
Popen.__del__`si€Ø×"Ò"à Ø �?‰?Ð "ñ
Ð2°T·X±XÑ=Ü!¨$õ
0ð
×Ñ xÐÔ0Ø �?‰?Ð "¤wÐ':ä �N‰N˜4Õ ð(;Ð "r-có —t|d«s7tjtjtj«|_|j
S)Nr%)r
rðrBÚdevnullÚO_RDWRr%r>s r.Ú _get_devnullzPopen._get_devnullos0€Ü�t˜ZÔ(ÜŸG™G¤B§J¡J´· ± Ó:ˆDŒMØ�}‰}Ðr-cór—|r |jj|« |jj
«y#t$rYŒ't$r)}|jtj
k(rn‚Yd}~ŒSd}~wwxYw#t$rYyt$r)}|jtj
k(rn‚Yd}~yd}~wwxYwr1)rãÚwriteÚBrokenPipeErrorrr'ÚEINVALrF)r6rÍrés r.Ú _stdin_writezPopen._stdin_writets¢€Ù ð
Ø—
‘
× Ñ  Ô'ð Ø �J‰J× Ñ Õ øô#ò
ÙÜò
Ø—9‘9¤§ ¡ Ò,ðàôûð 
ûôò Ù Üò Ø�y‰yœEŸL™LÒ(Øàôûð ús8„; A:» A7ÁA7ÁA2Á2A7Á: B6ÂB6Â
B1Â1B6có—|jr
|r td«‚|€ø|jsì|j|j|jgj d«dk\r·d}d}|jr|j
|«n�|jr5|jj«}|jj«n@|jr4|jj«}|jj«|j«||fS|�t«|z}nd} |j|||«\}} d|_|j|j|«¬«}||fS#t$r_|�&t|j|j|««}n |j}d|_ |j!|¬«‚#t"$rY‚wxYwwxYw#d|_wxYw)a9Interact with process: Send data to stdin and close it.
Read data from stdout and stderr, until end-of-file is
reached. Wait for process to terminate.
The optional "input" argument should be data to be sent to the
child process, or None, if no data should be sent to the child.
communicate() returns a tuple (stdout, stderr).
By default, all communication is in bytes, and therefore any
"input" should be bytes, and the (stdout, stderr) will be bytes.
If in text mode (indicated by self.text_mode), any "input" should
be a string, and (stdout, stderr) will be strings decoded
according to locale encoding, or by "encoding" if set. Text mode
is triggered by setting any of text, encoding, errors or
universal_newlines.
z.Cannot send input after starting communicationNr±rrÁT)r-r=rãrBr5Úcountr‚ÚreadrFrÃÚ_timeÚ _communicateroÚminr4Ú_remaining_timerpr)r6rÍrNrBr5ÚendtimeÚsigint_timeoutÚstss r.råzPopen.communicate�sÆ€ð$ × &Ò &©5ÜÐMÓNÐ Nð
ˆO D×$?Ò$?Ø
�Z‰Z˜Ÿ™ d§k¡kÐ 2× 8Ñ 8¸Ó >À!Ò C؈F؈FØ�zŠzØ×!Ñ! %Õ(Ø—’ØŸ™×)Ñ)Ó+�Ø— ‘ ×!Ñ!Õ#Ø—’ØŸ™×)Ñ)Ó+�Ø— ‘ ×!Ñ!Ô#Ø �I‰IŒKð:˜ÐÐð7Ð"Ü›' GÑ+‘à�ð
3Ø!%×!2Ñ!2°5¸'À7Ó!K‘�™ð"/3�Ô+à—)‘) D×$8Ñ$8¸Ó$A�)ÓBˆCà˜ÐÐøô)%ò
ðÐ&Ü%(¨×)?Ñ)?Ø)-×)=Ñ)=¸gÓ)Fó&H‘Nð&*×%;Ñ%;�NØ)*�Ô&ðØ—J‘J ~�JÔ6ðøô&òØØðúð
ûð /3�Õ+ús=Ä'E*Å*AGÆ/GÇGÇ GÇ GÇ
GÇGÇGÇ Gcó"—|j«S)zSCheck if child process has terminated. Set and return returncode
attribute.)rvr>s r.rçz
Popen.pollÑs€ð×"Ñ"Ó$Ð$r-có"—|€y|t«z
S)z5Convenience for _communicate when computing timeouts.N)r†)r6rŠs r.r‰zPopen._remaining_time×s€à ˆ?ØàœU›WÑ$Ð $r-có°—|€y|s
t«|kDrDt|j||rdj|«nd|rdj|«¬«‚d¬«‚y)z2Convenience for checking if a timeout has expired.Nr-rä)r†rr…rÚ)r6rŠÚ orig_timeoutÚ
stdout_seqÚ
stderr_seqÚskip_check_and_raises r.Ú_check_timeoutzPopen._check_timeoutßsf€ð ˆ?Ø Ù ¤5£7¨WÒ#4Ü Ø—I‘I˜|Ù3=˜3Ÿ8™8 JÔ/À4Ù3=˜3Ÿ8™8 JÓ/ôIð
IðDHôIð
Ið$5r-có—|�
t«|z} |j|¬«S#t$r_|�&t|j|j ««}n |j}d|_ |j|¬«‚#t $rY‚wxYwwxYw)z=Wait for child process to terminate; returns self.returncode.rÁr)r†rprorˆr4r‰r)r6rNrŠr‹s r.rÃz
Popen.waitës¦€à Ð Ü“g Ñ'ˆGð Ø—:‘: g�:Ó.Ð .øÜ ò ð
Ð"Ü!$ T×%;Ñ%;Ø%)×%9Ñ%9¸'Ó%Bó"D‘ð"&×!7Ñ!7�Ø%&ˆDÔ "ð
Ø—
‘
 >�
Ô2ð
øô"ò
ØØ ð
úð ús.‘#£AB Á(A;Á:B Á; BÂB ÂBÂB có¸—t|dd«}tj«5}tra|dk7r|j |j
«|dk7r|j |j
«|dk7r©|j |j
«n�|dk7r*|dk7r%||k7r |j t j|«|dk7r*|dk7r%||k7r |j t j|«|dk7r*|dk7r%||k7r |j t j|«|� |j t j|«ddd«d|_y#1swYd|_yxYw)Nr%r|T) r¡Ú
contextlibÚ ExitStackræÚcallbackrerðrFr5) r6rWrXrYrZr[r\Ú
devnull_fdÚstacks r.Ú_close_pipe_fdszPopen._close_pipe_fdss€ô
˜T :¨tÓ4ˆ
ä
×
!Ñ
!Ó
#ð 5 uÝØ˜b’=Ø—N‘N 7§=¡=Ô1ؘr’>Ø—N‘N 8§>¡>Ô2ؘr’>Ø—N‘N 8§>¡>Õ2à˜b’= X°¢^¸À:Ò8MØ—N‘N¤2§8¡8¨WÔ5ؘr’> g°¢m¸ÀJÒ8NØ—N‘N¤2§8¡8¨XÔ6ؘr’> g°¢m¸ÀJÒ8NØ—N‘N¤2§8¡8¨XÔ6àÐ%Ø—‘œrŸx™x¨Ô4÷# 5ð('+ˆÕ#÷) 5ð('+ˆÕ#ús ¢DE Å Ec#óK—g} |–—y#t|d«r|j|j«|`|D]N} tr!t |t
«r|j
«ntj|«ŒA#t$rYŒLwxYw‚xYw­w)zCHelper to ensure file descriptors opened in _get_handles are closedr%N)
r
r„r%rær.rarerðrFr)r6r]r^s r.Ú_on_error_fd_closerzPopen._on_error_fd_closers‡èø€ðˆð Ø‹Nøð Ü�t˜ZÔ(Ø—‘ §
¡
Ô.Ø�MØò
�ðÝ!¤j°´VÔ&<ØŸ™�
䟙 œ ùÜòÙðúð

ð
üs<‚B
† ŠB
‹0B
¼<A9Á8B
Á9 BÂB
ÂBÂB
Â
B
cóD—|€|€|€yd\}}d\}}d\}} |j«5}
|€qtjtj«}|�€
tjdd«\}} t |«}|
j
|«tj| «nÂ|tk(rCtjdd«\}}t |«t |«}}|
j||f«nv|tk(r$tj|j««}nIt|t«rtj|«}n#tj|j!««}|j#|«}|€qtjtj$«}|�€
tjdd«\} }t |«}|
j
|«tj| «nÂ|tk(rCtjdd«\}}t |«t |«}}|
j||f«nv|tk(r$tj|j««}nIt|t«rtj|«}n#tj|j!««}|j#|«}|€qtjtj&«} | �€tjdd«\} } t | «} |
j
| «tj| «nÎ|tk(rCtjdd«\}} t |«t | «} }|