[Newbies] scripts

Randal L. Schwartz merlyn at stonehenge.com
Fri Sep 26 13:03:41 UTC 2008

>>>>> "Randal" == Randal L Schwartz <merlyn at stonehenge.com> writes:

>>>>> "Bert" == Bert Freudenberg <bert at freudenbergs.de> writes:
Bert> Am 26.09.2008 um 05:12 schrieb Mark Volkmann:

>>> Is it possible to run a Squeak program from a terminal window and  have
>>> access to the stdin and stdout streams from the Smalltalk code?

And the longer still answer (now that I've noticed "access to stdin and
stdout") is to use an image with OSProcess loaded, and then you can
get access as follows:

  me := ThisOSProcess thisOSProcess.
  stdin := me stdIn. "acts like a Stream"
  stdout := me stdOut.
  stderr := me stdErr.
  stderr print: Time now; cr. "put the time of day on my stderr output"

Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn at stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion

More information about the Beginners mailing list