[fxruby-users] capturing stdout, stdin and stderr

angico angico at angico.org
Thu Nov 6 03:59:56 EST 2008

Em Qui, 2008-11-06 às 09:16 +0400, Rovshan Baghirov escreveu:
> Example from Programming Ruby book:
> pig = IO.popen("/usr/local/bin/pig", "w+")
> pig.puts "ice cream after they go to bed"
> pig.close_write
> puts pig.gets

Thank you, guys. I guess it's a starting point.

But what I really need is to have an application's stdin "connected" to
an FXInputDialog, in order to get user input, instead of the console.

Let's say I want to create a front-end to scp. The user will enter the
name of the host and the full filename in a dialog. Then I pass in these
data to scp through, say, popen. Ok. Then, scp will need to ask the user
for their password. Instead of the console asking the user to enter that
password, I'd like to catch this (including the message
"angico at's password: ") and present them to the user in an
FXInputDialog. I'm not sure if I'm being clear.

Anyway, does anybody know how can I achieve this? Any idea? Any

Thanks, again,


home page: www.angico.org
Gnu/Linux, FLOSS, Espiritismo, e eu por mim mesmo 8^I
email: angico at angico.org
skype: an.gi.co

More information about the fxruby-users mailing list