def redirecting_io(sys=_sys):
 assert (sys is not None)
 return (not hasattr(sys.stdout, 'fileno'))

def redirecting_io ( sys = _sys ) : assert ( sys is not None ) return ( not hasattr ( sys . stdout , 'fileno' ) )
predicate to determine if we are redicting i/o in process .