標準の csv モジュールは reader や writer を「ファイル様」オブジェクトにかぶせるようになっている。 UNIX 的な CLI のように標準出力に CSV を書きだしたいときはこうするとよさそう。 csv.writer に直接 sys.stdout を渡してもよさそうだけれど、これは csv ...
This is a simple example of using the OpenTelemetry Python SDK to create and export spans in OTLP JSON format to stdout. This is useful as a shim for systems that don't support traces first class, but ...
One thing to remember is that in Python, STDOUT and STDERR are buffered. When running in a terminal, this means that output will only show up after a newline (\n) has been written.