Exemplo n.º 1
0
 def colorize(self, logfile=None):
     """Can be output colored?"""
     return isatty(sys.stderr) if logfile is None else False
Exemplo n.º 2
0
 def __init__(self, app=None, stdout=sys.stdout, stderr=sys.stderr):
     self.app = thriftpool.thriftpool if app is None else app
     self.colored = colored(
         enabled=all([isatty(out) for out in (sys.stderr, sys.stdout)]))
     self.stdout = stdout
     self.stderr = stderr
Exemplo n.º 3
0
 def colorize(self, logfile=None):
     """Can be output colored?"""
     return isatty(sys.stderr) if logfile is None else False
Exemplo n.º 4
0
 def __init__(self, app=None, stdout=sys.stdout, stderr=sys.stderr):
     self.app = thriftpool.thriftpool if app is None else app
     self.colored = colored(enabled=all([isatty(out) for out
                                         in (sys.stderr, sys.stdout)]))
     self.stdout = stdout
     self.stderr = stderr