[squeak-dev] OSProcess capabilities on Windows

Balázs Kósi rebmekop at gmail.com
Tue Mar 24 16:19:47 UTC 2009


Hi,

> Ideally what I'd like to do is launch an executable (a Java application,
> typically invoked through a batch file) that listens for user-typed
> commands on stdin, and produces console-style responses.  I'd like to
> throw commands at it from Squeak, listen for the corresponding results,
> then eventually shut it down.

You might try the ProcessWrapper package.
We tried it with the image and vm in
http://ftp.squeak.org/3.7/win/Squeak3.7-current-win-full.zip on vista.
You can use it like:

p := ProcessWrapper new
    useStdout;
    startWithShellCommand: 'cat';
    yourself.
p writeToStdin: 'foo'.
(p next: 3) = 'foo'

It's available here: http://www.squeaksource.com/ProcessWrapper.html

Cheers, Balázs



More information about the Squeak-dev mailing list