io.stdin
Defined in module
"io"from "io" import stdinThe process's standard input stream, already open as an io.file instance.
Notes
stdin shares the process's handle rather than owning it, so close on it does nothing. Reading from it blocks until data (or end-of-file) arrives, which depends on what the process was launched with, so there is no example here: a doc page that reads stdin would hang or vary from one run to the next, and this site's examples must not do either. The read side is the same as any other file:
from "io" import stdin
let line = stdin.readblob(256) // blocks until input or end-of-file arrives
See also
stdout | The process's standard output stream, already open as an io.file instance. |
stderr | The process's standard error stream, already open as an io.file instance. |
readn | Reads a value of the given numeric format and returns it |
readblob | Reads up to size bytes and returns them as a blob |
| io | module index |