def isatty(self):  
return (self.redirect is not None and<EOL>hasattr(self.redirect, '<STR_LIT>') and self.redirect.isatty())<EOL>
Returns true of the redirect is a terminal.

Notes:
    Needed for IPython.embed to work properly when this class is used
    to override stdout / stderr.