popen and a long running process in a wx.python application

kyosohma at gmail.com kyosohma at gmail.com
Tue Jun 26 19:08:33 CEST 2007


On Jun 26, 10:16 am, Doru Moisa <moisad... at gmail.com> wrote:
> Hello,
>
> How can I capture the output of a long runnning process which I open
> with popen() ?
> I tried reading line by line, char by char, but the result always
> comes when the process finishes.
> (I am trying to make a wx.python program that opens some "make ..."
> with popen). How can I receive the output of the program immediatly,
> so that I can show a progressbar  in my application ?
> I always get the program's output after it finished executing.
> Is this the right place, or should I post this to wx.python ?
>
> Thank you in advance.

When talking about anything advanced with wxPython, you usually want
to submit it to the wxPython user's group. Lots of advanced users
(including the author of wxPython) answer questions there.

I would recommend looking at the following link as this will probably
be one of the first suggestions:
http://wiki.wxpython.org/index.cgi/LongRunningTasks?highlight=%28task%29%7C%28longrunning%29

wxPython mailing list: http://www.wxpython.org/maillist.php

I used a variation of one of the threading example in the
LongRunningTasks page to send output to a text widget, through stdout
redirection.

Good luck!

Mike




More information about the Python-list mailing list