scope of variables
Christoph Lehmann
lehmann at puk.unibe.ch
Fri Dec 13 08:59:58 EST 2002
please, don't laugh at me, but I am new to pyhton
why are the variables last_image not seen within the scope of the
function, or: how to make them seen (global)
image_time = []
last_image = -1
def image_selector( t ):
i = int(t/duration_per_image)
if i <> last_image:
image_time.append[VisionEgg.timing_func()]
last_image = i
return [ preloaded_stimulus_list[i] ]
thanks
chris
--
Christoph Lehmann
Department of Psychiatric Neurophysiology
University Hospital of Clinical Psychiatry
Waldau
CH-3000 Bern 60
Switzerland
Phone: ++41 31 930 93 83
Fax: ++41 31 930 96 61
Email: lehmann at puk.unibe.ch
Web:
More information about the Python-list
mailing list