Function in io compiler

stdout

fn stdout() -> Stream
Import
use io::{stdout};
Source: compiler/src/builtin_docs/io.hy

Returns a new stream on the process’s standard output.

The stream holds a duplicated descriptor, so closing it does not close the process’s stdout. write may write only part of the buffer; use io::sync::write_all (or io::sync::println) to write everything.

Returns#

Stream

Examples#

use io::{stdout};
use io::sync::{write_all};
use string::{to_bytes};
let _ = write_all(stdout(), to_bytes("hello\n"));

See also#

  • io::write
  • io::sync::write_all
  • io::sync::println
  • stdin: Returns a new stream on the process’s standard input.
  • stderr: Returns a new stream on the process’s standard error.
  • capture_begin: Starts keeping this thread’s stdout and stderr writes in memory instead of writing them, until the matching capture_end().
  • capture_end: Ends the innermost capture_begin() and returns what it kept, as (stdout, stderr).
  • open: Opens the file at path with mode and returns a stream on it.
↑ ↓ navigate ↵ open