[Tutor] commands with multiple things to do?

Diana Hawksworth dianahawks at optusnet.com.au
Tue Mar 29 08:08:23 CEST 2005


Dear list!

Is it possible for me to make a command do multiple things instead of 1?
For instance, I have a button that allows me to "submit" some user input (that is, show it in a window), but I also want it to count the number of times that submit button has been pressed.

I have tried this code:

   self.submit_bttn = Button(self, text = "Tries: 0", command = self.reveal, self.update_count)

but I get this error:

*** non-keyword arg after keyword arg

I have tried putting the code as 2 commands on separate lines, but it then will do just the 2nd command and not the first - it will either reveal what the user has typed, but not update, or will show the update but not reveal the user input!

Any ideas appreciated!

Thanks from newbie Diana
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20050329/ed6a1ec3/attachment.html


More information about the Tutor mailing list