FAQ
I'm trying to learn anygui, running on Win98. When I run backend(), I
get mswgui.

I've typed in the first program from the manual (one button, random
sentence in text box on click).

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.

I do have a link call (link (btn, handler).

Any ideas? Any place to look besides the on-line manual ahd Hetland's
Practical Python?

Thanks,

Gerry

Search Discussions

  • Geiregat Jonas at Jul 8, 2003 at 5:39 pm
    Op Tue, 08 Jul 2003 20:29:53 -0400, schreef Gerard C Blais:
    I'm trying to learn anygui, running on Win98. When I run backend(), I
    get mswgui.

    I've typed in the first program from the manual (one button, random
    sentence in text box on click).

    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.

    I do have a link call (link (btn, handler).

    Any ideas? Any place to look besides the on-line manual ahd Hetland's
    Practical Python?

    Thanks,

    Gerry
    This has nothig to do with your question but have you given
    www.wxpython.org a try it's a really great gui toolkit
  • Gerhard Häring at Jul 9, 2003 at 1:35 am

    Geiregat Jonas wrote:
    Op Tue, 08 Jul 2003 20:29:53 -0400, schreef Gerard C Blais:
    I'm trying to learn anygui, running on Win98. [snip problem description]
    This has nothig to do with your question [...]
    Then it's often worth it NOT to answer.

    -- Gerhard
  • Magnus Lie Hetland at Jul 9, 2003 at 12:52 pm
    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

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppython-list @
categoriespython
postedJul 8, '03 at 5:39p
activeJul 9, '03 at 12:52p
posts4
users4
websitepython.org

People

Translate

site design / logo © 2022 Grokbase