MCPcopy Create free account
hub / github.com/ai4colonoscopy/IntelliScope / write

Method write

colongpt/util/utils.py:80–92  ·  view source on GitHub ↗
(self, buf)

Source from the content-addressed store, hash-verified

78 return getattr(self.terminal, attr)
79
80 def write(self, buf):
81 temp_linebuf = self.linebuf + buf
82 self.linebuf = ''
83 for line in temp_linebuf.splitlines(True):
84 # From the io.TextIOWrapper docs:
85 # On output, if newline is None, any '\n' characters written
86 # are translated to the system default line separator.
87 # By default sys.stdout.write() expects '\n' newlines and then
88 # translates them so this is still cross platform.
89 if line[-1] == '\n':
90 self.logger.log(self.log_level, line.rstrip())
91 else:
92 self.linebuf += line
93
94 def flush(self):
95 if self.linebuf != '':

Callers 6

eval_engineFunction · 0.80
mainFunction · 0.80
vote_last_responseFunction · 0.80
http_botFunction · 0.80
vote_last_responseFunction · 0.80
http_botFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected