[Newbies] Re: Executing an external program

Hilaire Fernandes hilaire at ofset.org
Sat Jun 16 16:01:22 UTC 2007

And what about OSCommand on Windows ?


David T. Lewis a écrit :
> On Fri, Jun 15, 2007 at 08:59:46AM +0200, Hilaire Fernandes wrote:
>> David T. Lewis a ?crit :
>>> There is not (yet) a general cross-platform solution. If you can explain
>>> what kind of program you are trying to run, maybe I can give a suggestion.
>> Thanks for for  your feedback.
>> I want to run the espeak program for speech synthesis. Basically I just 
>> want to run a command like:
>> espeak "Speech a few word"
>> or
>> espeak "Speech a few word" -w output.wav
>> In the first case, it may be better if the command is executed in non 
>> blocking mode for Squeak.
>> In the second mode a blocking mode may be better, or even semaphore will 
>> be helpful.
> Hilaire,
> OSProcess will work well for this. When you run an external program, it
> gives you a "process proxy" in Squeak the keeps track of the run state of
> the external program, as well as exit status after the program completes.
> However, as I said this is not cross-platform. It will work on Linux and
> Unix, and will work on Mac OSX if you install the plugin from unix/linux.
> It will also work on Windows, but only if you build your own VM and
> modify some of the Windows platform source, so this is definitely not
> for beginners ;) So on, Windows, it is best to use FFI (but I don't think
> you can have a blocking mode with this).
> HTH,
> Dave

More information about the Beginners mailing list