Explain the -m flag in more detail#26930
Explain the -m flag in more detail#26930cuppajoeman wants to merge 1 commit intopython:mainfrom cuppajoeman:patch-1
Conversation
I learned how it works from here: https://docs.python.org/3/using/cmdline.html#cmdoption-m
|
Hello, and thanks for your contribution! I'm a bot set up to make sure that the project can legally accept this contribution by verifying everyone involved has signed the PSF contributor agreement (CLA). Recognized GitHub usernameWe couldn't find a bugs.python.org (b.p.o) account corresponding to the following GitHub usernames: This might be simply due to a missing "GitHub Name" entry in one's b.p.o account settings. This is necessary for legal reasons before we can look at this contribution. Please follow the steps outlined in the CPython devguide to rectify this issue. You can check yourself to see if the CLA has been received. Thanks again for the contribution, we look forward to reviewing it! |
|
This PR is stale because it has been open for 30 days with no activity. |
| Searches | ||
| Adds the current directory to the start of | ||
| .I sys.path | ||
| for the named module and runs the corresponding | ||
| and runs the corresponding |
There was a problem hiding this comment.
The fact that the current directory is added to sys.path is not specific to -m option, see https://docs.python.org/3/library/sys.html#sys.path. For instance, given the current directory:
.
└── pkg
├── __init__.py
└── mod.py
any python command will find pkg.mod (e.g. pydoc pkg.mod).
As the current wording explicitly refers to sys.path, I believe this is sufficient.
|
Closing this stale PR because the CLA is still not signed. |
I learned how it works from here: https://docs.python.org/3/using/cmdline.html#cmdoption-m