Skip to main content
added 95 characters in body
Source Link
Chris Degnen
  • 31.3k
  • 2
  • 56
  • 109

I have found one solution, using a temporary file:-

streams = AppendTo[$Output, OpenWrite[]];

Module[{},
  Print[Plot[Sin[x], {x, 0, 2 Pi}]];
  a = 123];

Close@Last@streams;
$Output = Most@streams;
printoutput = ReadList@First@Last@streams

enter image description here

I have found one solution, using a temporary file:-

streams = AppendTo[$Output, OpenWrite[]];

Module[{},
  Print[Plot[Sin[x], {x, 0, 2 Pi}]];
  a = 123];

Close@Last@streams;
$Output = Most@streams;
ReadList@First@Last@streams

I have found one solution, using a temporary file:-

streams = AppendTo[$Output, OpenWrite[]];

Module[{},
  Print[Plot[Sin[x], {x, 0, 2 Pi}]];
  a = 123];

Close@Last@streams;
$Output = Most@streams;
printoutput = ReadList@First@Last@streams

enter image description here

Source Link
Chris Degnen
  • 31.3k
  • 2
  • 56
  • 109

I have found one solution, using a temporary file:-

streams = AppendTo[$Output, OpenWrite[]];

Module[{},
  Print[Plot[Sin[x], {x, 0, 2 Pi}]];
  a = 123];

Close@Last@streams;
$Output = Most@streams;
ReadList@First@Last@streams