[Tkinter-discuss] Listbox selection persistence
fredrik at pythonware.com
Sat May 3 15:12:50 CEST 2008
> 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.
More information about the Tkinter-discuss