I made a simple PyGTK - Glade GUI for an application. I made the button, and the on_button_click calls a bash script. I would like to show a popup window while the bash script is running, and hide it after it is done. I made the window called runningWindow in Glade and wrote the following code:
def on_button1_clicked(self,widget):
self.glade.get_object("runningWindow").show()
os.system('bash run.sh')
self.glade.get_object("runningWindow").hide()
This code shows nothing while run.sh is running. If I remove the hide() line, the window is displayed correctly, but only AFTER the run.sh process has finished.
The init function that starts the GUI:
def __init__(self):
self.gladefile = "MyFile.glade"
self.glade = gtk.Builder()
self.glade.add_from_file(self.gladefile)
self.glade.connect_signals(self)
self.glade.get_object("MainWindow").show_all()
How can I display the window before the os.system is called? Thank you for your help!