Skip to content

Commit ccadb17

Browse files
committed
mention atty shenanigans + format
1 parent b60bc19 commit ccadb17

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

examples/python/stdio/main.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
#!/usr/bin/env python3
2-
"""
3-
Demonstrates how to log data to standard output with the Rerun SDK, and then visualize it
4-
from standard input with the Rerun Viewer.
5-
"""
2+
"""Demonstrates how to use standard input/output with the Rerun SDK/Viewer."""
63
from __future__ import annotations
74

85
import sys
@@ -17,4 +14,4 @@
1714

1815
input = sys.stdin.buffer.read()
1916

20-
rr.log("stdin", rr.TextDocument(input.decode('utf-8')))
17+
rr.log("stdin", rr.TextDocument(input.decode("utf-8")))

rerun_py/rerun_sdk/rerun/sinks.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,9 @@ def stdout(recording: RecordingStream | None = None) -> None:
7676
7777
Call this _before_ you log any data!
7878
79+
If there isn't any listener at the other end of the pipe, the `RecordingStream` will
80+
default back to `buffered` mode, in order not to break the user's terminal.
81+
7982
Parameters
8083
----------
8184
recording:

0 commit comments

Comments
 (0)