When I run python a/b.py
, I get:
Traceback (most recent call last):
File "a/b.py", line 10, in <module>
from . import config
ImportError: cannot import name 'config'
When I run python -m a.b
, I get no error.
What is the fundamental difference between the two approaches?