I've got a package called elements that contains some stuff like button, trifader, poster. In the Button class, I am doing from elements import *
This executes OK, and when I try to print(poster)
, also works OK and functions as expected. However, when I do print(trifader)
, NameError: name 'trifader' is not defined
. Even though trifader and poster are in the same package, poster is defined, but trifader isn't? How weird. Is there any explanation for this?
The directory structure of the elements package is this:
Elements:
__init__.py
trifader.py
button.py
poster.py
Also, some other stuff that isn't really relevant.
Each .py file contains a class with the name of the .py, for example, trifader.py has a class called TriFader.