Confusion about global variables in python -


I'm new to Python, so please excuse that maybe there is a very dumb question.

Actually, I have a global variable called Dedebug, which is used to determine whether the script should output debugging information or not. My problem is, I can not set it in another dragon script which uses it.

I have two scripts:

  one.py - ----- def my_function (): if _debug: print "debugging!" Running an error from _debug = False my_function ()  

two.py generates an error:

  name error: global name '_debug 'Not Defined  

Can anyone tell me what I am doing?

Comments