If I execute main.py
it works fine, the problem is when I execute demo2.py
|myPackage
|subPackage
demo.py
demo2.py
main.py
main.py
from ludikDriver.demo2 import demo2_print
demo2_print()
demo2.py
from .demo import demoprint
def demo2_print():
print("demo2")
demoprint()
demo2_print()
demo.py
def demoprint():
print("demo")
Error: from .demo import demoprint
ModuleNotFoundError: No module named '__main__.demo'; '__main__' is not a package
Should I have __init__.py
?