On Fri, Jan 10, 2020 at 11:53:10PM -0300, Soni L. wrote: > currently python -m requires you to cwd to the desired package root. I'd > like to suggest the ability to python -m > relative/path/to/package/root/module.submodule and python -m > /absolute/path/to/package/root/module.submodule
Oh, a further thought comes to mind... if your modules aren't on the PYTHONPATH, just drop the -m and you can execute any legal Python file, even if the name isn't a legal identifier. [steve@ando tmp]$ cp ~/python/spam/eggs.py /tmp/"some name".foo [steve@ando tmp]$ python3.5 "some name.foo" some name.foo So as I understand it, the functionality you want already exists, both for running scripts on the path using -m and scripts with arbitrary file names without -m. Have I missed some subtlety in your proposal? -- Steven _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/4VBL522TYWONZ6FAVQYOLDX237UIOKMU/ Code of Conduct: http://python.org/psf/codeofconduct/