Q: Is there any way to separate input and output? I want to input code in one window and show the results in another.
A: P. J. Hinton (firstname.lastname@example.org) writes: Here is a very simple implementation of what you describe using notebook manipulation functions. First, define a function named externalOutput that acts as a wrapper to NotebookWrite. This function needs to cope with Null output,
allow for recursive calls,
and all other output.
prevents graphics from being displayed in the notebook with Input style cells.
To use externalOutput, create a global variable named $outputNotebook which points to the notebook where output is to be placed.
Setting $Post to use externalOutput means that all expressions returned by the kernel will be fed to the externalOutput function.
Here are three tests.
All output, including graphics, is displayed in the external notebook. Any expression that returns Null does not create an Output style cell.
See also "Exporting Graphics," TMJ, 7 (2), 1998 p. 130 and the Tech Support column, TMJ, 7(2), 1998 pp. 145-146.
Copyright © 2002 Wolfram Media, Inc. All rights reserved.