Your IP : 216.73.216.213


Current Path : /opt/alt/python27/lib/python2.7/site-packages/py/_process/
Upload File :
Current File : //opt/alt/python27/lib/python2.7/site-packages/py/_process/cmdexec.pyc

�
%q�]c@s�ddlZddlZddlZddlmZmZd�Zdejjfd��YZee_yde_	de_
Wneefk
r�nXdS(i����N(tPopentPIPEc
Cs�tj|dtdtdtjdtj�}|j�\}}tjddkr�ytj�}Wn#tk
r�tj	j
p�d}nXt||j	j
p�|�}t||jj
p�|�}n|j
�}|r�t|||||��n|S(s� return unicode output of executing 'cmd' in a separate process.

    raise cmdexec.Error exeception if the command failed.
    the exception will provide an 'err' attribute containing
    the error-output from the command.
    if the subprocess module does not provide a proper encoding/unicode strings
    sys.getdefaultencoding() will be used, if that does not exist, 'UTF-8'.
    tshelltuniversal_newlineststdouttstderriisUTF-8(t
subprocessRtTrueRtcommunicatetsystversion_infotgetdefaultencodingtAttributeErrorRtencodingtunicodeRtpolltExecutionFailed(tcmdtprocesstoutterrtdefault_encodingtstatus((sD/opt/alt/python27/lib/python2.7/site-packages/py/_process/cmdexec.pytcmdexecs	
RcBseZd�Zd�ZRS(cCs>tj|�||_||_||_||_||_dS(N(t	Exceptiont__init__RtsystemstatusRRR(tselfRRRRR((sD/opt/alt/python27/lib/python2.7/site-packages/py/_process/cmdexec.pyR s
				cCsd|j|j|jfS(NsExecutionFailed: %d  %s
%s(RRR(R((sD/opt/alt/python27/lib/python2.7/site-packages/py/_process/cmdexec.pyt__str__(s(t__name__t
__module__RR(((sD/opt/alt/python27/lib/python2.7/site-packages/py/_process/cmdexec.pyRs	spy.process.cmdexectError(
R	RtpyRRRterrorRRRRRt	TypeError(((sD/opt/alt/python27/lib/python2.7/site-packages/py/_process/cmdexec.pyt<module>s