Import from other file in Pure Python project giving error because adds __main__
I made an empty __init__.py in the folder
I made it a source directory
My code:
from .dataClass import ExcelColumnsToinclude
Gives the error:
No module named '__main__.dataClass'; '__main__' is not a package
请先登录再写评论。
Solved: delete the dot before dataClass. Seems to be the python 2 way