I'm in the very early stages of learning python; so pardon me if it sounds so stupid.
I want to (eventually) write a GUI to some popular command-line tools (like mencoder, ffmpeg, rsync) using PyGTK/GtkBuilder/Glade.
I understand it is possible to spawn an external tool using Python. But I'm wondering how do I track the progress of the spawned process? If I have to display a visual progress indicator I need to know the 'begin' and 'end' value. But this may not be possible with a spawned process as we have no control over it.
I need to somehow determine how many 'steps' the spawned tool would take to complete the task and the number of steps it has completed so far. What are possible ways to achieve this. I'm not looking for a python code, just need some pointers.
Should I read from the 'standard out' of the spawned process, parse and determine the progress somehow? Is there a better solution?
Thanks for any help.
Bookmarks