Why does my python not add current working directory to the path?
Whether or not the current directory is in sys.path
, import statements usually look like:
import mymodule
The code you wrote looks like:
import 'mymodule.py'
It is the script's directory that is added, not the current directory. If you turn inner_folder/
into a package then you can use python -m inner_folder.myscript
in order to run the script while having app/
added to sys.path
.