MCPcopy Create free account
hub / github.com/IfcOpenShell/IfcOpenShell / stream_reader

Function stream_reader

nix/build-all.py:485–490  ·  view source on GitHub ↗
(pipe, collector: "list[str]", log_file)

Source from the content-addressed store, hash-verified

483 return datetime.now().strftime("%Y-%m-%d %H:%M:%S,%f")[:-3] # same format as logging
484
485 def stream_reader(pipe, collector: "list[str]", log_file) -> None:
486 for line in iter(pipe.readline, ""):
487 log_file.write(f"{timestamp()} {line}")
488 log_file.flush()
489 collector.append(line)
490 pipe.close()
491
492 logger.debug(f"running command `{' '.join(cmds)}` in directory '{cwd}'")
493 stdout: list[str] = []

Callers

nothing calls this directly

Calls 4

timestampFunction · 0.85
writeMethod · 0.45
appendMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected