Ronald Oussoren <ronaldousso...@mac.com> added the comment:
I don't know a good reason for including $PWD in sys.path for "python -m", I expect only scripts that run other scripts (such as coverage.py) might want the current behaviour and those can adjust to new behaviour. For "python -c CMD" the current behaviour is easier to defend, this matches the behaviour w.r.t. sys.path of typing the command in an interactive session. The behaviour for scripts (add the directory where the script is located to sys.path) is also easier to defend: that makes it easier to use scripts without installing stuf and without explicitly managing sys.path. I've used this in the past to split scripts into modules without installing modules in a global directory, but these days I tend to use virtual environment for that. I guess the usefulness of this behaviour depends on the type of user: the current behaviour is useful for more casual use of Python (which includes people learning python) ---------- nosy: +ronaldoussoren _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue35971> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com