When we run a python script/module .py
file, then the interpreter looks for any imports in the directory in which the running script is located, and not in the current working directory.
When we run python module using the -m
switch then it loads the current working directory into the path.
However, when we run python package using the -m
switch then which directory is loaded into the path? The current directory or directory containing the package or the package itself?
Can someone throw light on this concept.