def write(self, line):
            access_m = ColouredWriter.access_re.match(line)
            line_m = ColouredWriter.line_re.match(line)
            build_m = ColouredWriter.build_re.match(line)
            if access_m:
                server = "LIGHTTPD"
                time = access_m.group(3)
                who = access_m.group(1)
                request = access_m.group(4)
                code = int(access_m.group(5))
                size = int(access_m.group(6))
                line = ColouredWriter.coloured_access(time, request, code, size, server, who)
            elif line_m:
                server = "PYTHON"
                time = line_m.group(1)
                request = line_m.group(2)
                code = int(line_m.group(3))
                size = int(line_m.group(4))
                line = ColouredWriter.coloured_access(time, request, code, size, server)
            elif build_m:
                server = "BUILD"
                time = build_m.group(1)
                request = build_m.group(2)
                if request[1:].startswith("FAILED"):
                    build = ColouredWriter.colors['buildfail']
                elif request[1:].startswith("MSG"):
                    build = ColouredWriter.colors['buildmsg']
                else:
                    build = ColouredWriter.colors['build']
                endc = ColouredWriter.colors['endc']
                line = "%s %s %s%s%s\n" % (server[:3], time, build, request, endc)

            self.stdout.write(line)
            self.stdout.flush()
Write method.
dataset/ETHPy150Open turbulenz/turbulenz_tools/turbulenz_tools/utils/coloured_writer.py/ColouredWriter.write