I am trying to call a Python object inside a Python file, which I will call A.py, from another Python file which I will call B.py.
Inside B, I import that object like:
from .A import Object
It gives me the following error:
Traceback (most recent call last): File "B.py", line 1, in from .A import Object ModuleNotFoundError: No module named '__ main__ .A'; '__ main__' is not a package
I do not understand why it gives me an error. My code is written in Python 3.
Any suggestions? I do not understand other posts around object instances in Python.