Re: [Tutor] Callbacks in Python

2009-08-28 Thread Dave Angel
Jramak wrote: Thanks everyone for your excellent insights. I think I understand the callback concept better. So, it is like passing a function as an argument to another function. I am interested in learning more about how callbacks can be applied in GUIs, using wxPython as an example. Would appr

Re: [Tutor] Callbacks in Python

2009-08-27 Thread Jramak
Thanks everyone for your excellent insights. I think I understand the callback concept better. So, it is like passing a function as an argument to another function. I am interested in learning more about how callbacks can be applied in GUIs, using wxPython as an example. Would appreciate any insig

Re: [Tutor] Callbacks in Python

2009-08-27 Thread Alan Gauld
"Jramak" wrote I'm confused by callbacks. I would really appreciate any introduction or help in understanding the concept of callbacks. Callbacks are used in all sorts of different ways in programming so it might help to undertand what exactly confuses you. Is it the whole concept of a ca

Re: [Tutor] Callbacks in Python

2009-08-27 Thread Lie Ryan
Jramak wrote: Hello I'm confused by callbacks. I would really appreciate any introduction or help in understanding the concept of callbacks. By example: def callback(nums): """ The callback function """ return sum(nums) * 2 def another_callback(nums): """ Yet another callback f

Re: [Tutor] Callbacks in Python

2009-08-26 Thread Luke Paireepinart
On Wed, Aug 26, 2009 at 8:51 PM, Luke Paireepinart wrote: > > So you write a program that does what you want on each mouse click. > I meant "function" rather than "program". ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/

Re: [Tutor] Callbacks in Python

2009-08-26 Thread Luke Paireepinart
Suppose you are writing a GUI application. You don't want to write it from scratch so you want to use TKInter or WXPython. However, you also want to process the user's mouse clicks. These clicks won't occur in a consistent manner; sometimes they may occur frequently (double-clicking), sometimes

[Tutor] Callbacks in Python

2009-08-26 Thread Jramak
Hello I'm confused by callbacks. I would really appreciate any introduction or help in understanding the concept of callbacks. Thanks much Jramak ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor