Although the variable should be imported, I get "name X is not defined" exception.
main.py
from config import *
from utils import *
say_hello()
utils.py
from config import *
def say_hello():
print(config_var)
config.py
from utils import *
config_var = "Hello"
Trying to run "main.py":
Traceback (most recent call last): File "main.py", line 3, in say_hello() File "C:\Users\utils.py", line 3, in say_hello print(config_var) NameError: name 'config_var' is not defined
What happened here? Why some_var is not accessible from utils.py?