[pygtk] Hi, all! I'm new to the list. How can I create please a frontend for a TUI command?

Néstor Amigo Cairo nestorac at gmail.com
Mon Oct 27 22:56:45 WST 2008


Hi!

I'm working in a GUI application as a frontend for some commands to
copy some files into a Compact Flash. My question is: how can I
execute the command from the GUI and show the output on a TextView
inside the GUI application, line by line?? (the command is 'badblocks
-sw /dev/cardcf', which informs the user of the progress being made
checking a device).
The best I have got is an application which can execute the command,
and show the output when it finishes. I have heard about the
'subprocess' routines, and made some tests, but I'm currently unable
to show the output on a TextView as the program executes, I can only
send it to the terminal (and yes, the program executes while showing
it's output, I don't have to wait). How can I redirect this output to
a TextView??

I have trouble with the pipes, I redirect them to a variable (stdout
and stderr), but it's the same: it's always showing up in the
terminal, not in the GUI.

BTW, I can send you my application if needed, tomorrow morning. I
don't have it here right now.

Thanks!!!

-- 
Néstor
+34 687 96 74 81
nestorac at gmail.com


More information about the pygtk mailing list