MCPcopy
hub / github.com/xingyizhou/CenterNet / write

Method write

src/lib/logger.py:55–64  ·  view source on GitHub ↗
(self, txt)

Source from the content-addressed store, hash-verified

53 self.start_line = True
54
55 def write(self, txt):
56 if self.start_line:
57 time_str = time.strftime('%Y-%m-%d-%H-%M')
58 self.log.write('{}: {}'.format(time_str, txt))
59 else:
60 self.log.write(txt)
61 self.start_line = False
62 if '\n' in txt:
63 self.start_line = True
64 self.log.flush()
65
66 def close(self):
67 self.log.close()

Callers 4

mainFunction · 0.95
__init__Method · 0.80
save_resultsMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected