Repost: Text not showing up

Diez B. Roggisch deets at nospam.web.de
Mon Oct 17 21:46:05 CEST 2005


>> Hi all, I am new to python and trying to write a simple GUI that would 
>> call 2 growisofs processes (dvd burning) at the same time, and retrive 
>> the exit code to be printed on a text box (couldn't find any program 
>> that could use multiple dvd burners, not even k3b). Excuse me if this 
>> is really a simple problem, but two days of googling didn't help.
>> The program is really simple, I developed the GUI using glade and it 
>> works.
>> The only thing I would like to improve is that I'd like it to show in 
>> the text boxes messages like "Waiting for use input" or "Burning dvd 
>> please wait", but it looks like even though I don't have any error, 
>> the message won't show up until the burning process is finished 
>> (showing either "burning successfully" or "an error occurred").
>> I am not sure I made myself clear on this, but I will post the 
>> relevant code trying to explain it:

The problem is that the changes take effect after gtk has reentered its 
event-loop. Which won't happen until your programs terminate.

If your goal is only to display the messages, there is certainly a way 
to process the event loop for one iteration. Try and google for GTK 
event loops.

If you want to display an continuous update, you will have to install a 
timer event, and start the burning as subprocesses.

Regards,

Diez



More information about the Python-list mailing list