Clarification: STDIN is not available for data input in a Textual application, right? #3818
-
Hi everyone, Just for clarification: Textual needs STDIN to get keyboard and mouse events. So one cannot use STDIN to e.g. stream data into a Textual application, right? What would be the closest workaround? Using a different file descriptor? How wold one instruct the calling shell to shove the output of a data-producing command e.g. into file descriptor 3 and how would one read that from Python, then? 🤔 Cheers, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
You could do that prior to running the app, by reading STDIN in to memory or copying it to a temporary file. Alternatively your Textual app read data from a subprocess. |
Beta Was this translation helpful? Give feedback.
You could do that prior to running the app, by reading STDIN in to memory or copying it to a temporary file.
Alternatively your Textual app read data from a subprocess.