Skip to main content

Module console

Module console 

Source

Structs§

ConsoleCaptureGuard
Guard for a dynamic command-window capture scope such as evalc.
ConsoleEntry
Single console write (line or chunk) captured during execution.
DiaryStateSnapshot

Enums§

ConsoleStream
Identifies the console stream that received the text.

Functions§

append_thread_buffer
Append console entries captured on another execution thread without forwarding them again to live stream listeners.
begin_capture
Begin capturing command-window text for the current execution context.
diary_enabled
diary_filename
diary_state_snapshot
ensure_diary_writable
install_forwarder
Install (or remove) a global forwarder for console output. Passing None removes the current listener.
record_clear_screen
Record a control event that asks the host to clear the visible console.
record_console_line
Record a line-oriented console entry, ensuring the stream text ends with a newline.
record_console_output
Record console output for the current thread while also forwarding it to any registered listener (used by wasm bindings for live streaming).
record_diary_command
Append the top-level source text to the diary without echoing it to stdout.
record_value_output
Convenience helper to record formatted value output (matching MATLAB’s name = value layout).
replace_diary_state
reset_thread_buffer
Clears the per-thread console buffer. Call this before execution begins so each run only returns fresh output.
set_diary_enabled
set_diary_enabled_checked
set_diary_filename
set_diary_filename_checked
take_diary_error
take_last_value_output
take_thread_buffer
Drain (and return) the buffered console entries for the current thread.
toggle_diary