Mini Kabibi Habibi

Current Path : C:/Users/ITO/AppData/Local/Programs/GIMP 2/lib/python2.7/
Upload File :
Current File : C:/Users/ITO/AppData/Local/Programs/GIMP 2/lib/python2.7/subprocess.pyo

�
���dc	@s�dZddlZejdkZddlZddlZddlZddlZddlZddl	Z	ddl
m
Z
defd��YZer�ddl
Z
ddlZddlZdfd��YZd	fd
��YZnoddlZeed�Zyddl
Z
Wnek
r&eZ
nXddlZddlZeedd
�ZdddddddgZer�ddlmZmZmZmZm Z m!Z!m"Z"m#Z#ej$ddddddddg�nyej%d�Z&Wn
dZ&nXgZ'd�Z(dZ)d Z*d!�Z+d"�Z,d#�Z-d$�Z.d%�Z/de0fd&��YZ1d'�Z2d(�Z3e4d)kr�er�e3�ne2�ndS(*s�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
========
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
Popen(...): A class for flexibly executing a command in a new process

Constants
---------
PIPE:    Special value that indicates a pipe should be created
STDOUT:  Special value that indicates that stderr should go to stdout
i����Ntwin32(tlist2cmdlinetCalledProcessErrorcBs#eZdZdd�Zd�ZRS(s�This exception is raised when a process run by check_call() or
    check_output() returns a non-zero exit status.

    Attributes:
      cmd, returncode, output
    cCs||_||_||_dS(N(t
returncodetcmdtoutput(tselfRRR((s/D:/a/msys64/mingw64/lib/python2.7/subprocess.pyt__init__4s		cCsd|j|jfS(Ns-Command '%s' returned non-zero exit status %d(RR(R((s/D:/a/msys64/mingw64/lib/python2.7/subprocess.pyt__str__8sN(t__name__t
__module__t__doc__tNoneRR(((s/D:/a/msys64/mingw64/lib/python2.7/subprocess.pyR-stSTARTUPINFOcBs&eZdZdZdZdZdZRS(iN(R	R
tdwFlagsRt	hStdInputt
hStdOutputt	hStdErrortwShowWindow(((s/D:/a/msys64/mingw64/lib/python2.7/subprocess.pyR
@s
t
pywintypescBseZeZRS((R	R
tIOErrorterror(((s/D:/a/msys64/mingw64/lib/python2.7/subprocess.pyRFstpolltPIPE_BUFitPopentPIPEtSTDOUTtcallt
check_calltcheck_output(tCREATE_NEW_CONSOLEtCREATE_NEW_PROCESS_GROUPtSTD_INPUT_HANDLEtSTD_OUTPUT_HANDLEtSTD_ERROR_HANDLEtSW_HIDEtSTARTF_USESTDHANDLEStSTARTF_USESHOWWINDOWRRR R!R"R#R$R%tSC_OPEN_MAXicCs_xXtD]O}|jdtj�}|dk	rytj|�WqWtk
rSqWXqqWdS(Nt
_deadstate(t_activet_internal_polltsystmaxintRtremovet
ValueError(tinsttres((s/D:/a/msys64/mingw64/lib/python2.7/subprocess.pyt_cleanupls
i����cGsVxOtrQy||�SWqttfk
rM}|jtjkrGqn�qXqWdS(N(tTruetOSErrorRterrnotEINTR(tfunctargste((s/D:/a/msys64/mingw64/lib/python2.7/subprocess.pyt_eintr_retry_call{s	cCs�i	dd6dd6dd6dd6d	d
6dd6d
d6dd6dd6}g}xP|j�D]B\}}ttj|�}|dkrX|jd||�qXqXWttjd�dkr�|jd�nx"tjD]}|jd|�q�W|S(snReturn a list of command-line arguments reproducing the current
    settings in sys.flags and sys.warnoptions.tdtdebugtOtoptimizetBtdont_write_bytecodetstno_user_sitetStno_sitetEtignore_environmenttvtverbosetbt
bytes_warningt3tpy3k_warningit-thash_randomizations-Rs-W(titemstgetattrR*tflagstappendtwarnoptions(tflag_opt_mapR6tflagtoptRE((s/D:/a/msys64/mingw64/lib/python2.7/subprocess.pyt_args_from_interpreter_flags�s(
cOst||�j�S(s�Run command with arguments.  Wait for command to complete, then
    return the returncode attribute.

    The arguments are the same as for the Popen constructor.  Example:

    retcode = call(["ls", "-l"])
    (Rtwait(t	popenargstkwargs((s/D:/a/msys64/mingw64/lib/python2.7/subprocess.pyR�scOsSt||�}|rO|jd�}|dkr=|d}nt||��ndS(sSRun 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 Popen constructor.  Example:

    check_call(["ls", "-l"])
    R6iN(RtgetRR(RWRXtretcodeR((s/D:/a/msys64/mingw64/lib/python2.7/subprocess.pyR�s

cOs�d|krtd��ntdt||�}|j�\}}|j�}|r�|jd�}|dkr||d}nt||d|��n|S(sRun command with arguments and return its output as a byte string.

    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"])
    '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)
    'ls: non_existent_file: No such file or directory\n'
    tstdouts3stdout argument not allowed, it will be overridden.R6iRN(R-RRtcommunicateRRYRR(RWRXtprocessRt
unused_errRZR((s/D:/a/msys64/mingw64/lib/python2.7/subprocess.pyR�s
cBs�eZdZeZdd!d!d!d!d!eed!d!ed!dd�
Zd�Zej	d�Z
d!d�Zd�Ze
r�d�Zd�Zd	�Zd
�Zd!ejejejd�Zd�Zd
�Zd�Zd�Zd�ZeZn�d�Zed�Zd�Zd�Z e!r)e!j"�Z#nde$fd��YZ%e%�Z#d�Ze&j'e&j(e&j)e&j*e&j+e&j,d�Z-d!e&j.e&j/e&j0e1j2d�Zd�Zd�Zd�Z3d�Z4d�Zd�Zd �ZRS("s� 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.

      universal_newlines: If true, use universal line endings for file
          objects stdin, stdout and stderr.

      startupinfo and creationflags (Windows only)

    Attributes:
        stdin, stdout, stderr, pid, returncode
    icCst�t|ttf�s+td��ntr�|d
k	rLtd��n|r�|d
k	sv|d
k	sv|d
k	r�td��q�n6|
d
k	r�td��n|dkr�td��nd
|_d
|_	d
|_
d
|_d
|_||_
|j|||�\\}}}}}}}yA|j|||||
|||
||	|||||||�Wn{tk
r�tj�\}}}xF|D]>}y$tr�|j�n
tj|�Wq�tk
r�q�Xq�W|||�nXtr^|d
k	r
tj|j�d�}n|d
k	r4tj|j�d�}n|d
k	r^tj|j�d�}q^n|d
k	r�tj|d|�|_n|d
k	r�|r�tj|d|�|_	q�tj|d	|�|_	n|d
k	r|r�tj|d|�|_
qtj|d	|�|_
nd
S(sCreate new Popen instance.sbufsize must be an integers0preexec_fn is not supported on Windows platformssSclose_fds is not supported on Windows platforms if you redirect stdin/stdout/stderrs2startupinfo is only supported on Windows platformsis4creationflags is only supported on Windows platformstwbtrUtrbN(R0t
isinstancetinttlongt	TypeErrort	mswindowsRR-tstdinR[tstderrtpidRtuniversal_newlinest_get_handlest_execute_childt	ExceptionR*texc_infotClosetostclosetEnvironmentErrortmsvcrttopen_osfhandletDetachtfdopen(RR6tbufsizet
executableRgR[Rht
preexec_fnt	close_fdstshelltcwdtenvRjtstartupinfot
creationflagstp2creadtp2cwritetc2preadtc2pwriteterrreadterrwritetto_closetexc_typet	exc_valuet	exc_tracetfd((s/D:/a/msys64/mingw64/lib/python2.7/subprocess.pyR	sl						-	



cCs(|jdd�}|jdd�}|S(Ns
s
s
(treplace(Rtdata((s/D:/a/msys64/mingw64/lib/python2.7/subprocess.pyt_translate_newlineskscCsL|js
dS|jd|�|jdkrHtdk	rHtj|�ndS(NR'(t_child_createdR)RRR(RP(Rt_maxint((s/D:/a/msys64/mingw64/lib/python2.7/subprocess.pyt__del__qs
	cCs |j|j|jgjd�dkrd}d}|jr�|r�y|jj|�Wq�tk
r�}|jtjkr�|jtj	kr��q�q�Xn|jj
�nV|jr�t|jj�}|jj
�n+|jr�t|jj�}|jj
�n|j
�||fS|j|�S(sfInteract with process: Send data to stdin.  Read data from
        stdout and stderr, until end-of-file is reached.  Wait for
        process to terminate.  The optional input argument should be a
        string to be sent to the child process, or None, if no data
        should be sent to the child.

        communicate() returns a tuple (stdout, stderr).iN(RgR[RhtcountRtwriteRR3tEPIPEtEINVALRqR8treadRVt_communicate(RtinputR[RhR7((s/D:/a/msys64/mingw64/lib/python2.7/subprocess.pyR\s('	$
		

cCs
|j�S(sSCheck if child process has terminated. Set and return returncode
        attribute.(R)(R((s/D:/a/msys64/mingw64/lib/python2.7/subprocess.pyR�scCs5t�}|dkr7|dkr7|dkr7d|fSd\}}d\}}d\}	}
|dkr�tjtj�}|dkrtjdd�\}}qnc|tkr�tjdd�\}}n<t|tt	f�r�t
j|�}nt
j|j��}|j
|�}|j|�|tkr>|j|�n|dkr�tjtj�}|dkr�tjdd�\}}q�nc|tkr�tjdd�\}}n<t|tt	f�r�t
j|�}nt
j|j��}|j
|�}|j|�|tkr!|j|�n|dkritjtj�}
|
dkr�tjdd�\}}
q�nx|tkr�tjdd�\}	}
nQ|tkr�|}
n<t|tt	f�r�t
j|�}
nt
j|j��}
|j
|
�}
|j|
�|tkr|j|	�n|||||	|
f|fS(s|Construct and return tuple with IO objects:
            p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite
            iN(NNNNNN(NN(NN(NN(tsetRt_subprocesstGetStdHandleR t
CreatePipeRRbRcRdRst
get_osfhandletfilenot_make_inheritabletaddR!R"R(RRgR[RhR�R�R�R�R�R�R�t_((s/D:/a/msys64/mingw64/lib/python2.7/subprocess.pyRk�sd	$


	
cCs+tjtj�|tj�ddtj�S(s2Return a duplicate of handle, which is inheritableii(R�tDuplicateHandletGetCurrentProcesstDUPLICATE_SAME_ACCESS(Rthandle((s/D:/a/msys64/mingw64/lib/python2.7/subprocess.pyR��scCs�tjjtjjtjd��d�}tjj|�s�tjjtjjtj�d�}tjj|�s�t	d��q�n|S(s,Find and return absolut path to w9xpopen.exeisw9xpopen.exesZCannot locate w9xpopen.exe, which is needed for Popen to work with your shell or platform.(
RptpathtjointdirnameR�tGetModuleFileNametexistsR*texec_prefixtRuntimeError(Rtw9xpopen((s/D:/a/msys64/mingw64/lib/python2.7/subprocess.pyt_find_w9xpopen�s			c
st|tj�s!t|�}n|dkr9t�}nd|||fkr~|jtjO_||_	||_
||_n|
r(|jtjO_tj
|_tjjdd�}dj||�}tj�dks�tjj|�j�dkr(|j�}d||f}|	tjO}	q(n�fd�}zjy>tj||ddt|�|	|||�	\}}}}Wn%tjk
r�}t|j��nXWd|dk	r�||�n|dk	r�||�n|dk	r�||�nXt|_ ||_!||_"|j#�dS(	s$Execute program (MS Windows version)tCOMSPECscmd.exes
{} /c "{}"lscommand.coms"%s" %scs|j��j|�dS(N(RoR,(R�(R�(s/D:/a/msys64/mingw64/lib/python2.7/subprocess.pyt_close_in_parent2s
N($RbttypestStringTypesRRR
RR�R$RRRR%R#RRptenvironRYtformatt
GetVersionR�tbasenametlowerR�Rt
CreateProcessRcRRtWindowsErrorR6R1R�t_handleRiRo(RR6RxRyRzR|R}RjR~RR{R�R�R�R�R�R�R�tcomspecR�R�thpthtRittidR7((R�s/D:/a/msys64/mingw64/lib/python2.7/subprocess.pyRl	sR		


			cCsF|jdkr?||jd�|kr?||j�|_q?n|jS(s�Check if child process has terminated.  Returns returncode
            attribute.

            This method is called by __del__, so it can only refer to objects
            in its local scope.

            iN(RRR�(RR't_WaitForSingleObjectt_WAIT_OBJECT_0t_GetExitCodeProcess((s/D:/a/msys64/mingw64/lib/python2.7/subprocess.pyR)ZscCsD|jdkr=tj|jtj�tj|j�|_n|jS(sOWait for child process to terminate.  Returns returncode
            attribute.N(RRR�tWaitForSingleObjectR�tINFINITEtGetExitCodeProcess(R((s/D:/a/msys64/mingw64/lib/python2.7/subprocess.pyRVks

cCs|j|j��dS(N(RPR�(Rtfhtbuffer((s/D:/a/msys64/mingw64/lib/python2.7/subprocess.pyt
_readerthreaduscCs�d}d}|jrYg}tjd|jd|j|f�}|jt�|j�n|jr�g}tjd|jd|j|f�}|jt�|j�n|j	r%|dk	ry|j	j
|�Wqtk
r}|jtj
kr�q|jtjkrq�qXn|j	j�n|jr;|j�n|jrQ|j�n|dk	rj|d}n|dk	r�|d}n|jr�ttd�r�|r�|j|�}n|r�|j|�}q�n|j�||fS(NttargetR6itnewlines(RR[t	threadingtThreadR�t	setDaemonR1tstartRhRgR�RR3R�R�RqR�RjthasattrtfileR�RV(RR�R[Rht
stdout_threadt
stderr_threadR7((s/D:/a/msys64/mingw64/lib/python2.7/subprocess.pyR�ysP	

	

	
	
	



cCs�|tjkr|j�ne|tjkrDtj|jtj�n=|tjkrltj|jtj�ntdj	|���dS(s)Send a signal to the process
            sUnsupported signal: {}N(
tsignaltSIGTERMt	terminatetCTRL_C_EVENTRptkillRitCTRL_BREAK_EVENTR-R�(Rtsig((s/D:/a/msys64/mingw64/lib/python2.7/subprocess.pytsend_signal�s
cCsvytj|jd�WnXtk
rq}|jdkr>�ntj|j�}|tjkre�n||_nXdS(s#Terminates the process
            iiN(R�tTerminateProcessR�R2twinerrorR�tSTILL_ACTIVER(RR7trc((s/D:/a/msys64/mingw64/lib/python2.7/subprocess.pyR��scCs�t�}d\}}d\}}d\}	}
|dkr<n^|tkrp|j�\}}|j||f�n*t|ttf�r�|}n|j�}|dkr�n^|tkr�|j�\}}|j||f�n*t|ttf�r�|}n|j�}|dkrn�|tkrJ|j�\}	}
|j|	|
f�n]|t	kr}|dk	rk|}
q�t
jj�}
n*t|ttf�r�|}
n|j�}
|||||	|
f|fS(s|Construct and return tuple with IO objects:
            p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite
            N(NN(NN(NN(R�RRtpipe_cloexectupdateRbRcRdR�RR*t
__stdout__(RRgR[RhR�R�R�R�R�R�R�((s/D:/a/msys64/mingw64/lib/python2.7/subprocess.pyRk�sF					cCs~y
tj}Wntk
r&d}nXtj|tj�}|r_tj|tj||B�ntj|tj||@�dS(Ni(tfcntlt
FD_CLOEXECtAttributeErrortF_GETFDtF_SETFD(RR�tcloexectcloexec_flagtold((s/D:/a/msys64/mingw64/lib/python2.7/subprocess.pyt_set_cloexec_flag	s


cCs6tj�\}}|j|�|j|�||fS(s#Create a pipe with FDs set CLOEXEC.(RptpipeR�(Rtrtw((s/D:/a/msys64/mingw64/lib/python2.7/subprocess.pyR�s

cCs�ttd�r6tjd|�tj|dt�nGxDtdt�D]3}||kr^qFnytj|�WqFqFXqFWdS(Nt
closerangeii(R�RpR�tMAXFDtxrangeRq(Rtbutti((s/D:/a/msys64/mingw64/lib/python2.7/subprocess.pyt
_close_fds"st_noop_context_managercBseZd�Zd�ZRS(cCsdS(N((R((s/D:/a/msys64/mingw64/lib/python2.7/subprocess.pyt	__enter__9tcGsdS(N((RR6((s/D:/a/msys64/mingw64/lib/python2.7/subprocess.pyt__exit__:R�(R	R
R�R�(((s/D:/a/msys64/mingw64/lib/python2.7/subprocess.pyR�6s	c!s�t|tj�r|g}nt|�}|
rVddg|}|rV||d<qVn|dkro|d}n�fd�}�j�\}}zz��j�tj�}tj	�WdQXyt
j��_Wn|r�tj
�n�nXt�_�jdkr0zy�|
dk	r)t
j|
�n|dk	rEt
j|�n|dk	rat
j|�nt
j|�|dkr�t
j|�}n|dks�|dkr�t
j|�}n�fd�}||d�||d�||d�dh}xL|||gD];}||kr|dkrt
j|�|j|�qqW|dk	r`t
j|�n|rp|�n|r��jd	|�n|dkr�t
j||�nt
j|||�Wn\tj�\}}}tj|||�}d
j|�|_t
j|tj|��nXWdt
j d�Xn|rCtj
�nWdt
j|�Xt!t
j"|d�}g}x,|r�|j#|�t!t
j"|d�}qsWd
j|�}Wd|dk	r�|
dk	r�||�n|dk	r�|dk	r�||�n|dk	r!|dk	r!||�nt
j|�X|d
kr�yt!t
j$�jd�Wn+t%k
r�}|j&t&j'kr��q�nXtj(|�} | �ndS(
sExecute program (POSIX version)s/bin/shs-cicstj|��j|�dS(N(RpRqR,(R�(R�(s/D:/a/msys64/mingw64/lib/python2.7/subprocess.pyR�Ts
NicsB||kr�j|t�n|dk	r>tj||�ndS(N(R�tFalseRRptdup2(taRG(R(s/D:/a/msys64/mingw64/lib/python2.7/subprocess.pyt_dup2�siR�R�i�i()RbR�R�tlistRR�t_disabling_gc_locktgct	isenabledtdisableRptforkRitenableR1R�RqtdupR�tchdirR�texecvptexecvpeR*Rnt	tracebacktformat_exceptionR�tchild_tracebackR�tpickletdumpst_exitR8R�RPtwaitpidR2R3tECHILDtloads(!RR6RxRyRzR|R}RjR~RR{R�R�R�R�R�R�R�R�terrpipe_readt
errpipe_writetgc_was_enabledR�tclosedR�R�R�ttbt	exc_linesR�tpickle_bitsR7tchild_exception((RR�s/D:/a/msys64/mingw64/lib/python2.7/subprocess.pyRl?s�


	



	

		!	




cCsl||�r||�|_nI||�r=||�|_n+||�r\||�|_ntd��dS(NsUnknown child exit status!(RR�(Rtstst_WIFSIGNALEDt	_WTERMSIGt
_WIFEXITEDt_WEXITSTATUSt_WIFSTOPPEDt	_WSTOPSIG((s/D:/a/msys64/mingw64/lib/python2.7/subprocess.pyt_handle_exitstatus�sc	Cs�|jdkr�y;||j|�\}}||jkrI|j|�nWq�|k
r�}|dk	rt||_n|j|kr�d|_q�q�Xn|jS(s�Check if child process has terminated.  Returns returncode
            attribute.

            This method is called by __del__, so it cannot reference anything
            outside of the local scope (nor can any methods it calls).

            iN(RRRiRR3(	RR't_waitpidt_WNOHANGt	_os_errort_ECHILDRiRR7((s/D:/a/msys64/mingw64/lib/python2.7/subprocess.pyR)�s	cCs�x�|jdkr�y"ttj|jd�\}}Wn:tk
rp}|jtjkr^�n|j}d}nX||jkr|j	|�qqW|jS(sOWait for child process to terminate.  Returns returncode
            attribute.iN(
RRR8RpRRiR2R3RR(RRiRR7((s/D:/a/msys64/mingw64/lib/python2.7/subprocess.pyRVs"	
cCs�|jr/|jj�|s/|jj�q/ntrM|j|�\}}n|j|�\}}|dk	r�dj|�}n|dk	r�dj|�}n|jr�t	t
d�r�|r�|j|�}n|r�|j|�}q�n|j�||fS(NR�R�(
RgtflushRqt	_has_pollt_communicate_with_pollt_communicate_with_selectRR�RjR�R�R�RV(RR�R[Rh((s/D:/a/msys64/mingw64/lib/python2.7/subprocess.pyR�s$	

cs>d}d}i�i}tj����fd�}��fd�}|jrm|rm||jtj�ntjtjB}|jr�||j|�g||jj�<}n|j	r�||j	|�g||j	j�<}nd}xH�r3y�j�}	Wn5tj
k
r9}
|
jdtj
kr3q�n�nXx�|	D]�\}}|tj@r�|||t!}
y|tj||
�7}Wn5tk
r�}
|
jtjkr�||�q��q,X|t|�kr,||�q,qA||@r"tj|d�}|s||�n||j|�qA||�qAWq�W||fS(Ncs*�j|j�|�|�|j�<dS(N(tregisterR�(tfile_objt	eventmask(tfd2filetpoller(s/D:/a/msys64/mingw64/lib/python2.7/subprocess.pytregister_and_append>scs,�j|��|j��j|�dS(N(t
unregisterRqtpop(R�(R)R*(s/D:/a/msys64/mingw64/lib/python2.7/subprocess.pytclose_unregister_and_removeBs
ii(RtselectRRgtPOLLOUTtPOLLINtPOLLPRIR[R�RhRR6R3R4t	_PIPE_BUFRpR�R2R�tlenR�RP(RR�R[Rht	fd2outputR+R.tselect_POLLIN_POLLPRItinput_offsettreadyR7R�tmodetchunkR�((R)R*s/D:/a/msys64/mingw64/lib/python2.7/subprocess.pyR$7sT			



cCs�g}g}d}d}|jr:|r:|j|j�n|jr\|j|j�g}n|jr~|j|j�g}nd}x�|s�|r�y"tj||g�\}}}	Wn5tjk
r�}
|
jdtj	kr�q�n�nX|j|kr�|||t
!}ytj|jj
�|�}WnHtk
rv}
|
jtjkrp|jj�|j|j�q��q�X||7}|t|�kr�|jj�|j|j�q�n|j|krtj|jj
�d�}
|
dkr|jj�|j|j�n|j|
�n|j|kr�tj|jj
�d�}
|
dkrr|jj�|j|j�n|j|
�q�q�W||fS(NiiR�(RRgRPR[RhR/RR6R3R4R3RpR�R�R2R�RqR,R4R�(RR�tread_sett	write_setR[RhR7trlisttwlisttxlistR7R:t
bytes_writtenR�((s/D:/a/msys64/mingw64/lib/python2.7/subprocess.pyR%ts\				"




cCstj|j|�dS(s)Send a signal to the process
            N(RpR�Ri(RR�((s/D:/a/msys64/mingw64/lib/python2.7/subprocess.pyR��scCs|jtj�dS(s/Terminate the process with SIGTERM
            N(R�R�R�(R((s/D:/a/msys64/mingw64/lib/python2.7/subprocess.pyR��scCs|jtj�dS(s*Kill the process with SIGKILL
            N(R�R�tSIGKILL(R((s/D:/a/msys64/mingw64/lib/python2.7/subprocess.pyR��sN(5R	R
RR�R�RRR�R*R+R�R\RRfRkR�R�RlR�R�t
WAIT_OBJECT_0R�R)RVR�R�R�R�R�R1R�R�R�R�tLockR�tobjectR�RptWIFSIGNALEDtWTERMSIGt	WIFEXITEDtWEXITSTATUSt
WIFSTOPPEDtWSTOPSIGRRtWNOHANGRR3RR$R%(((s/D:/a/msys64/mingw64/lib/python2.7/subprocess.pyR�s`"			^	"		F			Q	
		;				4
				�			!	=	9		cCs(tdgdt�j�d}dGH|GHtj�dkr`tdgdd��}|j�ndGHtd	gdt�}td
dgd|jdt�}t|j�d�GHHd
GHytdg�j�GHWnFtk
r}|j	t	j
krdGHdGH|jGHq$dG|j	GHnXtj
dIJdS(NtpsR[is
Process list:tidRycSs
tjd�S(Nid(Rptsetuid(((s/D:/a/msys64/mingw64/lib/python2.7/subprocess.pyt<lambda>�R�sLooking for 'hda'...tdmesgtgrepthdaRgsTrying a weird file...s/this/path/does/not/exists'The file didn't exist.  I thought so...sChild traceback:tErrorsGosh.  No error.(RRR\RptgetuidRVR[treprR2R3tENOENTRR*Rh(tplisttptp1tp2R7((s/D:/a/msys64/mingw64/lib/python2.7/subprocess.pyt_demo_posix�s*
!cCsldGHtddtdt�}tdd|jdt�}t|j�d�GHdGHtd	�}|j�dS(
Ns%Looking for 'PROMPT' in set output...R�R[R{s
find "PROMPT"RgisExecuting calc...tcalc(RRR1R[RUR\RV(RYRZRX((s/D:/a/msys64/mingw64/lib/python2.7/subprocess.pyt
_demo_windows�st__main__(5RR*tplatformRfRpR�RR�R�R3RRmRR�RsR�R
RR/R�R#tImportErrorRR�RRNR3t__all__RRR R!R"R#R$R%textendtsysconfR�R(R0RRR8RURRRRDRR[R]R	(((s/D:/a/msys64/mingw64/lib/python2.7/subprocess.pyt<module>sp

:
						!����	)