T
Tom
Hi folks,
I have a really strange problem. I have a module and at the beginning I
include some others by:
from xxx import *
works perfectly except for one import. I always get an error saying:
NameError: global name 'yyy' is not defined (yyy is a function in xxx)
I don't understand that. I checked everything and I have no typos in my
code.
If I copy the import line from the beginning of my module and paste it
right before I refere to it in the function (which is of course
extreemly bad programming, but I just did that to find the error) it
works. I don't get it. Shouldn't it work if I import it at the beginning
of the code? It works for all the other modules I import!! I have no
typos and all the other imports work. Also the module itself works, I
checked that, but I get this name error and I don't understand that. :-(
Thanks for your help.
Regards, Tom
I have a really strange problem. I have a module and at the beginning I
include some others by:
from xxx import *
works perfectly except for one import. I always get an error saying:
NameError: global name 'yyy' is not defined (yyy is a function in xxx)
I don't understand that. I checked everything and I have no typos in my
code.
If I copy the import line from the beginning of my module and paste it
right before I refere to it in the function (which is of course
extreemly bad programming, but I just did that to find the error) it
works. I don't get it. Shouldn't it work if I import it at the beginning
of the code? It works for all the other modules I import!! I have no
typos and all the other imports work. Also the module itself works, I
checked that, but I get this name error and I don't understand that. :-(
Thanks for your help.
Regards, Tom