[Tutor] visibility of variables

Victor Reijs genietdev0 at iol.ie
Mon Aug 1 18:58:13 CEST 2005

It seems I used the wrong keywords to find answer to my question. This 
page is very very helpfull! I now works indeed. THANKS for your fast help.

All the best,


Kent Johnson wrote:
>>I have problems with the visibility of variables in python. I am
>>used to the idea of Javascript and other languages where one can define
>>global variables if they are defined outside a function. It seems Python
>>is not doing that, but how can I make it work?
>>I think it needs some twist in my mind to get used to it, but I still
>>don't grasp it. Can you help?
> In function Do() you must add the declaration
>   global gemetenkleur
> See http://www.python.org/doc/faq/programming.html#how-do-you-set-a-global-variable-in-a-function and the entry that follows it for some explanation.

More information about the Tutor mailing list