I made a simple PyGTK - Glade GUI for the application. I made a button, and on_button_click calls a bash script. I would like to show a popup while the bash script is running, and hide it after it completes. I made a window called runWindow 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 delete the hide () line, the window will display correctly, but only AFTER the run.sh process is complete.
The init function that launches the graphical user interface:
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 a window before calling os.system? Thanks for the help!
source share