stderr
fn stderr() -> Stream Import
Source: use io::{stderr}; compiler/src/builtin_docs/io.hy Returns a new stream on the process’s standard error.
The stream holds a duplicated descriptor, so closing it does not close the process’s stderr.
Returns#
Stream
Examples#
use io::{stderr, write};
use string::{to_bytes};
use tests::assert;
let n = match write(stderr(), to_bytes("")) {
Result::Ok(n) => n,
Result::Err(_) => -1,
};
assert!(n == 0);
See also#
stdin: Returns a new stream on the process’s standard input.stdout: Returns a new stream on the process’s standard output.capture_begin: Starts keeping this thread’s stdout and stderr writes in memory instead of writing them, until the matchingcapture_end().capture_end: Ends the innermostcapture_begin()and returns what it kept, as(stdout, stderr).open: Opens the file atpathwithmodeand returns a stream on it.close: Closess.read: Reads bytes fromsinto the front ofbufwithout waiting.write: Writes bytes frombuftoswithout waiting and returns how many were written.