§
#(NÀ†Iø¤ã óª — d Z ddlZddlZddlZddlZddlZddlZddlZddlZddl Z ddl
Z
ddlZddlmZ
ddlZ ddlZn
# e$ r dZY nw xY wg d¢Z ddlZdZn
# e$ r dZY nw xY wej dvZerDddlZddlmZmZmZmZmZmZmZmZm Z m!Z!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z) e * g d ¢¦ « n@er*dd
l+m,Z- ej. Z/ej0 Z1ej2 Z3ej4 Z5ej6 Z7ndZ-dZ/dZ1dZ3dZ5dZ7ddl8Z8ddl9Z9 G d„ de:¦ « Z; G d
„ de;¦ « Z< G d„ de;¦ « Z=er G d„ d¦ « Z> G d„ de?¦ « Z@n( eAe8dd¦ « ZB eCe9d¦ « re9jD ZEne9jF ZEerdZGd„ ZHng ZGd„ ZHdZIdZJdZKd„ ZLd„ ZMd„ ZNdd œd!„ZOd"„ ZPdd œd#„ZQ G d$„ d%eR¦ « ZSddddd&œd'„ZTd(„ ZUddd)œd*„ZVddd)œd+„ZWd,„ ZX eX¦ « ZYdZZ G d-„ d.¦ « Z[dS )/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)r r r r r r r r ÚSTARTUPINFOr r r r r r! r" r# r$ r% )Ú fork_execc ó — e Zd ZdS )r N)Ú__name__Ú
__module__Ú__qualname__© ó ú7/opt/alt/python-internal/lib64/python3.11/subprocess.pyr r { s € € € € € € € r- r c óV — e Zd ZdZdd„Zd„ Zed„ ¦ « Zej d„ ¦ « ZdS )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 ó> — || _ || _ || _ || _ d S ©N)Ú
returncodeÚcmdÚoutputÚstderr)Úselfr2 r3 r4 r5 s r. Ú__init__zCalledProcessError.__init__… s" € Ø$ˆŒØˆŒØˆŒØˆŒˆˆr- c óØ — | j rS| j dk rHd| j ›dt j | j ¦ « ›d�S # t $ r d| j | j fz cY S w xY wd| j | j fz S )Nr ú Command 'z' died with ú.z)Command '%s' died with unknown signal %d.z.Command '%s' returned non-zero exit status %d.)r2 r3 ÚsignalÚSignalsÚ
ValueError©r6 s r. Ú__str__zCalledProcessError.__str__‹ s¬ € ØŒ?ð /˜tœ°Ò2Ð2ð
4àœ˜˜¥&¤.°$´/Ð1AÑ"BÔ"BÐ"BÐ"BðDð Døåð
4ð
4ð
4ØBØœ 4¤?Ð"2ðF4ñ 4ð 4ð 4ð 4ð
4øøøð DØ”H˜dœoðG/ñ /ð
/s “%9 ¹AÁAc ó — | j S )z+Alias for output attribute, to match stderr©r4 r> s r. ÚstdoutzCalledProcessError.stdout— s € ð Œ{Ðr- c ó — || _ d S r1 rA ©r6 Úvalues r. rB zCalledProcessError.stdoutœ ó € ð ˆŒˆˆr- ©NN© r) r* r+ Ú__doc__r7 r? ÚpropertyrB Úsetterr, r- r. r
r
~ sy € € € € € ðð ðð ð ð ð
/ð
/ð
/ð ðð ñ „Xðð „]ðð ñ „]ðð ð r- r
c óV — e Zd ZdZdd„Zd„ Zed„ ¦ « Zej d„ ¦ « ZdS )r z›This exception is raised when the timeout expires while waiting for a
child process.
Attributes:
cmd, output, stdout, stderr, timeout
Nc ó> — || _ || _ || _ || _ d S r1 )r3 Útimeoutr4 r5 )r6 r3 rN r4 r5 s r. r7 zTimeoutExpired.__init__ª s" € ؈ŒØˆŒØˆŒØˆŒˆˆr- c ó( — d| j ›d| j ›d�S )Nr9 z' timed out after z seconds)r3 rN r> s r. r? zTimeoutExpired.__str__° s € € à”��˜4œ<˜<˜<ð)ð *r- c ó — | j S r1 rA r> s r. rB zTimeoutExpired.stdout´ s
€ àŒ{Ðr- c ó — || _ d S r1 rA rD s r. rB zTimeoutExpired.stdout¸ rF r- rG rH r, r- r. r r £ sy € € € € € ðð ðð ð ð ð*ð *ð *ð ðð ñ „Xðð „]ðð ñ „]ðð ð r- r c ó* — e Zd Zdddddddœd„Zd„ ZdS )r&