btn1 = wTree.get_widget('button1')
window.connect('delete_event', lambda wid, we: gtk.main_quit())
btn1.connect('clicked', aplay_func)
window.show_all()
gtk.main()
Activating and Disabling button after process in python and pyGTK