[Python-ideas] Relative Imports

danish bluecheese danish.bluecheese at gmail.com
Fri Nov 9 18:51:46 EST 2018


└── src
    ├── __init__.py
    ├── main.py
    └── test
        ├── __init__.py
        └── test_main.py

assume the structure above. To be able to use relative imports with such
fundamental structure either i can go for sys.path hacks or could run as a
module from one further level parent.
I do not like this :D want to be able to use relational imports freely as
soon as I provide correct relational path.

Please let me know, if it is not clear on any aspect.
Thank you. Regards.

On Fri, Nov 9, 2018 at 3:39 PM Steven D'Aprano <steve at pearwood.info> wrote:

> On Fri, Nov 09, 2018 at 03:20:52PM -0800, danish bluecheese wrote:
> > It supports, but whenever you get multiple folders there is no clean
> > solution.
>
> What do you mean?
>
>
> --
> Steve
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20181109/ef824bef/attachment.html>


More information about the Python-ideas mailing list