mirror of
https://github.com/python/cpython.git
synced 2026-01-18 21:30:02 +00:00
Historically, -m added the empty string as sys.path
zero, meaning it resolved imports against the current
working directory, the same way -c and the interactive
prompt do.
This changes the sys.path initialisation to add the
*starting* working directory as sys.path[0] instead,
such that changes to the working directory while the
program is running will have no effect on imports
when using the -m switch.
(cherry picked from commit
|
||
|---|---|---|
| .. | ||
| data | ||
| __init__.py | ||
| __main__.py | ||