<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On Sep 26, 2008, at 8:03 AM, Randal L. Schwartz wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">"Randal" == Randal L Schwartz &lt;<a href="mailto:merlyn@stonehenge.com">merlyn@stonehenge.com</a>> writes:<br></blockquote></blockquote></blockquote></blockquote></blockquote><br><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">"Bert" == Bert Freudenberg &lt;<a href="mailto:bert@freudenbergs.de">bert@freudenbergs.de</a>> writes:<br></blockquote></blockquote></blockquote></blockquote></blockquote>Bert> Am 26.09.2008 um 05:12 schrieb Mark Volkmann:<br><br><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">Is it possible to run a Squeak program from a terminal window and &nbsp;have<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">access to the stdin and stdout streams from the Smalltalk code?<br></blockquote></blockquote></blockquote><br>And the longer still answer (now that I've noticed "access to stdin and<br>stdout") is to use an image with OSProcess loaded, and then you can<br>get access as follows:<br><br> &nbsp;me := ThisOSProcess thisOSProcess.<br> &nbsp;stdin := me stdIn. "acts like a Stream"<br> &nbsp;stdout := me stdOut.<br> &nbsp;stderr := me stdErr.<br> &nbsp;stderr print: Time now; cr. "put the time of day on my stderr output"<br></div></blockquote></div><div><br></div>Thanks for the example code! Now I think all I need is to find out how to launch the code from a terminal window. At&nbsp;<a href="http://wiki.squeak.org/squeak/1914">http://wiki.squeak.org/squeak/1914</a> I found this.<div><br></div><div>"<span class="Apple-style-span" style="font-family: Times; font-size: 16px; ">To initiate external shell processing, evaluate ''ExternalCommandShell stop'', save the image, and restart with ''squeak -headless myImage''."</span></div><div><font class="Apple-style-span" face="Times" size="4"><span class="Apple-style-span" style="font-size: 16px;"><br></span></font></div><div><font class="Apple-style-span" face="Times" size="4"><span class="Apple-style-span" style="font-size: 16px;">It's not clear to me what will be run when that last command is executed from a terminal window. Where would I put code like your example code above and how does the squeak command know to execute it?<br></span></font><div> <span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Arial; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Arial; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br class="Apple-interchange-newline">---</div><div>Mark Volkmann</div><div><br class="webkit-block-placeholder"></div></div></span><br class="Apple-interchange-newline"></span><br class="Apple-interchange-newline"> </div><br></div></body></html>