newbie: callback functions

Fredrik Lundh fredrik at pythonware.com
Tue Apr 17 15:42:22 EDT 2001


"koenig at v-i-t.de" wrote:
> i meant something like this
>
>  Button( dlgframe, text="OK", relief=GROOVE, command=load )
>
> i want to pass "load" pass a eg. filename, so that "load" knows what to load.
> how is this possible?

    def mycb():
        load("filename")

    Button( dlgframe, text="OK", relief=GROOVE, command=mycb )

Cheers /F





More information about the Python-list mailing list