[Tkinter-discuss] Listbox selection persistence

Fredrik Lundh fredrik at pythonware.com
Sat May 3 15:12:50 CEST 2008


leegold wrote:

> But the x does not seem to persist outside of the
> def selected() block. I want the final last button
> press to persist so I can use those indexes for
> further processing. What am I missing here?

variables that are assigned inside a function are made local by default; 
to treat them otherwise, you need to flag them as global.

see your favourite Python tutorial for details.

</F>



More information about the Tkinter-discuss mailing list