Bind event is giving me a bug.
Peter Otten
__peter__ at web.de
Wed Jan 15 16:25:31 EST 2014
More information about the Python-list mailing list
Wed Jan 15 16:25:31 EST 2014
- Previous message (by thread): Bind event is giving me a bug.
- Next message (by thread): Bind event is giving me a bug.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
MRAB wrote:
> This will make it call 'get_text' when the button is clicked:
>
>> Button(root, text = "Submit", command = get_text).pack()
...and then produce a TypeError because of the missing `event` argument. To
avoid that you can provide a default with
def get_text(event=None):
...
- Previous message (by thread): Bind event is giving me a bug.
- Next message (by thread): Bind event is giving me a bug.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list