On Mon, Feb 24, 2020 at 6:04 PM Eryk Sun <eryk...@gmail.com> wrote:

> On 2/24/20, jdve...@gmail.com <jdve...@gmail.com> wrote:
> >
> > I try to use along with -m (`python -I -m a.b`) and get this error:
> "python:
> > Error while finding module specification for 'a.b' (ModuleNotFoundError:
> No
> > module named 'a')".
>
> This is a use case for -m that requires adding the working directory
> to sys.path. I work in virtual environments, and I don't navigate into
> a package and execute modules. The target package is always either in
> the standard library or installed in site-packages, and the module is
> executed from the top level. So for me adding the working directory is
> a feature I never need, and I completely forgot about why anyone would
> want it.
>

Having the working directory added when using the -m flag is something I
use in quite a few of my project. See
https://aroberge.github.io/friendly-traceback-docs/docs/html/usage.html for
example (example usages 3 to 6 rely on this).




> _______________________________________________
> 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/RAZRNATFDLGS3MIAIEXXLKQTD447UK3P/
> Code of Conduct: http://python.org/psf/codeofconduct/
>
_______________________________________________
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/7AQB4M7CIS6MTUNBDWXNC4JYVDZIUI65/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to