scope of variables
Wojtek Walczak
gminick at hacker.pl
Fri Dec 13 10:38:48 EST 2002
Dnia Fri, 13 Dec 2002 14:59:58 +0100, Christoph Lehmann napisał(a):
> why are the variables last_image not seen within the scope of the
> function, or: how to make them seen (global)
Use global :)
> image_time = []
> last_image = -1
> def image_selector( t ):
global last_image
> i = int(t/duration_per_image)
...
--
[ ] gminick (at) underground.org.pl http://gminick.linuxsecurity.pl/ [ ]
[ "Po prostu lubie poranna samotnosc, bo wtedy kawa smakuje najlepiej." ]
More information about the Python-list
mailing list