[squeak-dev] Re: OSProcess capabilities on Windows
Aran Lunzer
aran at meme.hokudai.ac.jp
Tue Mar 24 19:01:42 UTC 2009
Hello Bal$(D+!(Bzs - thanks for the pointer!
>> 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
So... I tried installing it, but none of my 3.7 images (on XP or on Vista)
could work with the ready-built DLL. Not even the out-of-the-box 3.7
release. The 3.9 release image seemed much happier: the precise example
you gave here didn't work as I was expecting, but the basic example on the
SqueakSource summary page did:
ProcessWrapper new
useStdout;
startWithShellCommand: 'echo hello';
upToEnd
--> 'hello<cr>'
Looking at the source code for the DLL, I'm afraid that at the level of my
non-Squeak skills it would probably take me a day to rebuild it. Do you
happen to have a 3.7-specific compiled DLL?
Many thanks
Aran
More information about the Squeak-dev
mailing list
|