Переменную, которая должна быть глобальной, невозможно увидеть! Это файлы
Код: Выделить всё
__init__.py
main.py
helpers.py
Код: Выделить всё
from .helpers import *
class scene:
def __init__(self,variables):
self.variables = variables
global _scene
_scene = scene(100)
Код: Выделить всё
from .main import *
print(_scene)
Код: Выделить всё
NameError: name '_scene' is not defined
Код: Выделить всё
from .main import *
from .helpers import *
Подробнее здесь: https://stackoverflow.com/questions/683 ... other-file
Мобильная версия