def write(self, s): if isinstance(s, str): _outputcapture.CaptureStdout(s) elif isinstance(s, unicode): _outputcapture.CaptureStdout(s.encode('utf8'))
def write(self, s): if isinstance(s, str): _outputcapture.CaptureStdout(s) elif isinstance(s, six.text_type): _outputcapture.CaptureStdout(s.encode("utf8"))