This is an extract from the code of a Quickly application I'm working on:
# Code for other initialization actions should be added here.
self.apachestart = self.builder.get_object("apachestart")
self.label1 = self.builder.get_object("label1")
def on_apachestart_clicked(self, widget):
subprocess.call(['sudo', 'service', 'apache2', 'start'])
Now when I press the button to start Apache (named apachestart), it prints to standard out in the terminal that the server was started:
* Starting web server apache2 [ OK ]
How do I get that text output from the terminal to be shown in a label?