[Newbies] Using squeak with a script?

Jacques Harmand jacques.harmand at gmail.com
Wed Feb 22 16:09:21 UTC 2017


Thanks for your answers.
Alas ExternalCommandShell does not seem to work, the VM seems to wait
forever.
I also tried various other ways:
"OSProcess thisOSProcess stdOut nextPutAll: 'Hello world'."
"FileStream stdout nextPutAll: 'Hello world'."
"StandardFileStream stdout nextPutAll: 'Hello world'."
"TranscriptStream redirectToStdOut: true. Transcript show: 'Hello world'."
... but so far none of them seems to work.
I also tried "-headless" and "-vm-display-null", but again this does not
seem to help.
Any pointer would be appreciated!

2017-02-22 15:49 GMT+01:00 H. Hirzel <hannes.hirzel at gmail.com>:

> Maybe
>
>       ExternalCommandShell
>
>      http://wiki.squeak.org/squeak/6023
>
> this is of some help?
>
> --Hannes
>
> On 2/22/17, Göran Krampe <goran at krampe.se> wrote:
> > On 21/02/17 20:51, Jacques Harmand wrote:
> >> Hi list,
> >> I try to use squeak to execute the following basic Smalltalk script (in
> >> a file "hello.st <http://hello.st>")
> >> "Transcript show: 'Hello world'; cr."
> >> from the command line with Squeak.  This works as expected with both GNU
> >> Smalltalk and Pharo, but with Squeak nothing happens: Squeak seems to
> >> wait forever.  If I add
> >> "Smalltalk snapshot: false andQuit: true."
> >> after the above line, the execution of the script terminates, but
> >> without printing anything.
> >
> > I haven't looked closely at latest Squeak (perhaps Pharo has coupled
> > Transcript to stdout for headless mode?), but Transcript is not the same
> > thing as stdout - so you wouldn't see anything on stdout.
> >
> > regards, Göran
> > _______________________________________________
> > Beginners mailing list
> > Beginners at lists.squeakfoundation.org
> > http://lists.squeakfoundation.org/mailman/listinfo/beginners
> >
> _______________________________________________
> Beginners mailing list
> Beginners at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/mailman/listinfo/beginners
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/beginners/attachments/20170222/3bd6f0f0/attachment.html>


More information about the Beginners mailing list