anygui newbie question

Magnus Lie Hetland mlh at furu.idi.ntnu.no
Wed Jul 9 08:52:26 EDT 2003


In article <54omgv8rb7p08uct892h6q1qck489gvoph at 4ax.com>, Gerard C Blais wrote:
>
[snip]
>Window comes up fine.  When I click the button, I get a run-time error
>and the traceback says my handler function has received an unexpected
>argument, "source".  As far as I can tell, "source" should be
>expected.
[snip]
>Any ideas?  Any place to look besides the on-line manual ahd Hetland's
>Practical Python?

The problem is actually addressed in Practical Python... You're using
the planned 0.2 event handler syntax (used in the Practical Python
examples), but should (for now) use the 0.1.1 syntax. In other words,
rather than

  def handler(event): ...

you should have

  def handler(**kwds): ...

or the like. There is a note about this on page 339 of Practical
Python.

>Thanks,
>
>Gerry

-- 
Magnus Lie Hetland                "In this house we obey the laws of
http://hetland.org                 thermodynamics!"    Homer Simpson




More information about the Python-list mailing list