P
psaroudakis
Hi....
i am trying to implement the following:
I want to be able to press a button, perform a task and return a
value.
my button is named button1 and I used glade to build the gui.
so, something like this should work....
application=gtk.glade.XML('app.glade','app')
bt=app.get_widget('button1')
bt.connect('clicked',on_btClicked)
def on_btClicked(widget,event):
if data==0:
P=1
else:
P=2
return P
How can I get P?
Something like this doesn't work:
bt.connect('clicked',P=on_btClicked)
How can I return P???
Thanks!
Nick
i am trying to implement the following:
I want to be able to press a button, perform a task and return a
value.
my button is named button1 and I used glade to build the gui.
so, something like this should work....
application=gtk.glade.XML('app.glade','app')
bt=app.get_widget('button1')
bt.connect('clicked',on_btClicked)
def on_btClicked(widget,event):
if data==0:
P=1
else:
P=2
return P
How can I get P?
Something like this doesn't work:
bt.connect('clicked',P=on_btClicked)
How can I return P???
Thanks!
Nick