Lisp Knowledgebase

Title: Where does *standard-output* appear?

ID: 17020


Product: All
Version: All
OS: All

Description:
*standard-output* in CAPI processes
In the Listener tool (and other tools with a listener) *standard-output* is bound to the listener stream.

In other CAPI processes, including the other IDE tools, *standard-output* is bound to mp:*background-standard-output*, a stream which outputs in the Output tab of many tools.

*standard-output* in non-CAPI processes
In non-CAPI processes, *standard-output* is bound to a synonym stream to *terminal-io*. Therefore if you print to *standard-output* in a process you create by mp:process-run-function, or in a timer function, then the output will go to *terminal-io*.

Suppose you want the output of non-CAPI processes to appear in the IDE tools, for example the GUI listener. Capture the stream like this in the Listener:

CL-USER 14 > (setf *so* *standard-output*)
#<EDITOR::RUBBER-STREAM #<EDITOR:BUFFER CAPI interactive-pane 6>>


and redefine your function to print to *so*.

*terminal-io* in LispWorks for Windows
In LispWorks for Windows, *terminal-io* is a console window that is initially hidden.

If you occasionally want to view the console window, the simplest way to make the console window appear when running the distributed image is to evaluate

(read-line *terminal-io*)

Just enter something at the resulting console window to return to the LispWorks GUI window.

You can save an image which makes the console window itself by calling save-image with an appropriate value for the :console argument. See the documentation for save-image for details.

See Also:
Workaround:
Patch:

Hardware:N/A
Summary:
Bug#:
Patch Enhancement#:
Reported:

Company     Contact     Privacy Policy     Terms of Use