help-smalltalk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-smalltalk] Getting the output of a system command


From: ZuLuuuuuu
Subject: [Help-smalltalk] Getting the output of a system command
Date: Fri, 10 Dec 2010 02:13:32 -0800 (PST)

Hello,

My intention is to write the output of a command I execute inside my
application, into a graphical widget. But first I have to get the output
from execution. When I execute a command like this:

Smalltalk system: 'bla bla bla'

it returns the exit code. When I execute a command via opening a pipe:

pipe := FileStream popen: 'bla bla bla' dir: FileStream read.

I can get the "normal" output by #nextLine etc. But if it exits with an exit
code different then 0, I cannot read any output, for example, #nextLine
returns nil. How can I get the error message as well?


Canol

-----
Canol Gökel
-- 
View this message in context: 
http://forum.world.st/Getting-the-output-of-a-system-command-tp3081680p3081680.html
Sent from the Gnu mailing list archive at Nabble.com.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]