File: //opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/tests/test_exec_command.pyo
�
�9Zc @` s� d d l m Z m Z m Z d d l Z d d l Z d d l m Z d d l m Z e j
d d k rz d d l m Z n d d l m Z d e
f d � � YZ d e
f d
� � YZ d e
f d � � YZ d
� Z d � Z d S( i ( t divisiont absolute_importt print_functionN( t
TemporaryFile( t exec_commandi ( t StringIOt redirect_stdoutc B` s, e Z d Z d d � Z d � Z d � Z RS( s9 Context manager to redirect stdout for exec_command test.c C` s | p t j | _ d S( N( t syst stdoutt _stdout( t selfR ( ( sZ /opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/tests/test_exec_command.pyt __init__ s c C` s t j | _ | j t _ d S( N( R R t
old_stdoutR ( R
( ( sZ /opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/tests/test_exec_command.pyt __enter__ s c C` s* | j j � | j t _ | j j � d S( N( R t flushR R R t close( R
t exc_typet exc_valuet traceback( ( sZ /opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/tests/test_exec_command.pyt __exit__ s
N( t __name__t
__module__t __doc__t NoneR R
R ( ( ( sZ /opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/tests/test_exec_command.pyR s t redirect_stderrc B` s, e Z d Z d d � Z d � Z d � Z RS( s9 Context manager to redirect stderr for exec_command test.c C` s | p t j | _ d S( N( R t stderrt _stderr( R
R ( ( sZ /opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/tests/test_exec_command.pyR ! s c C` s t j | _ | j t _ d S( N( R R t
old_stderrR ( R
( ( sZ /opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/tests/test_exec_command.pyR
$ s c C` s* | j j � | j t _ | j j � d S( N( R R R R R R ( R
R R R ( ( sZ /opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/tests/test_exec_command.pyR ( s
N( R R R R R R
R ( ( ( sZ /opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/tests/test_exec_command.pyR s t emulate_nonposixc B` s, e Z d Z d d � Z d � Z d � Z RS( s. Context manager to emulate os.name != 'posix' s non-posixc C` s
| | _ d S( N( t _new_name( R
t osname( ( sZ /opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/tests/test_exec_command.pyR 0 s c C` s t j | _ | j t _ d S( N( t ost namet _old_nameR ( R
( ( sZ /opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/tests/test_exec_command.pyR
3 s c C` s | j t _ d S( N( R! R R ( R
R R R ( ( sZ /opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/tests/test_exec_command.pyR 7 s ( R R R R R
R ( ( ( sZ /opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/tests/test_exec_command.pyR . s c C` s� t t � � �( t t � � � t j d � Wd QXWd QXt j d k r� t � �>