
­­­­­­­­­­­­­­­­­­
<!DOCTYPE html>
<html>
3
Yj                 @   s   d dl Z dgZdddZdS )    NrunProgc       
      C   s   |d krg }| g| }d }|r@t |d}|j j }W d Q R X ddi}y tj|tjtjtjd|d}W n tk
r|   d
S X |j|\}}	|j	dd	}|j
|fS )NrZLANGCT)stdinstderrstdoutZ	close_fdsenv    zutf-8replace)r	   r
   )openreadencode
subprocessPopenPIPEZSTDOUTOSErrorZcommunicatedecode
returncode)
progargvr   argsZinput_stringZhandler   ZprocessoutputZ
err_output r   /usr/lib/python3.6/prog.pyr      s$    

)NN)r   __all__r   r   r   r   r   <module>   s   