I have a file with name "x.py". This contains a Class "Y".
I have a second file with name "z.py".
x.py and z.py are in the same directory. This directoty has an empty file with name __init__.py
In z.py I do:
from x import Y
This brings ImportError: cannot import name Y
If I do
import x
then I have no exception but aswell nothing from x.py
What could be the problem here?
Update: In server environment, it works. But not in local, which is Windows with sublime text. When entire code of x is in z, then it works aswell locally.
Structure is
-Folder A
---x.py with class Y inside
---z.py with (from x import Y)