I wasn't clear how to correctly name this question.
Assume that I have the following directory structure.
from foo import bar
From the docs: "When a module named spam is imported, the interpreter searches for a file named spam.py in the current directory, and then in the list of directories specified by the environment variable PYTHONPATH. This has the same syntax as the shell variable PATH, that is, a list of directory names."
Note that "current directory" is relative to the main script path (the one where
__name__ == '__main__' is True). So if you are at
/foo/bar.py, "current directory" refers to