* Dani Hodovic <danih...@gmail.com> [2015-03-12 21:51:50 +0100]: > I have a very large project with deeply nested hierarchies. To find the > root directory I use a source root walker and append the root directory to > sys.path. This way, I can easily import things in the project relative to > the root directory.
I don't know how to teach pylint to understand this - but if I understood correctly, shouldn't python packages to that anyways? e.g. if you have a tree like this: myproject/ __init__.py utils/ __init__.py foo.py bar.py modules/ __init__.py eggs.py bacon.py spam.py And start your project correctly via `python -m myproject`, you should be able to do something like `from myproject.utils.foo import fish` in e.g. myproject/modules/eggs.py just fine. If that is what you're attempting, I recommend reading http://bit.ly/pypackages. If not and I misunderstood something, sorry! :) Florian -- http://www.the-compiler.org | m...@the-compiler.org (Mail/XMPP) GPG: 916E B0C8 FD55 A072 | http://the-compiler.org/pubkey.asc I love long mails! | http://email.is-not-s.ms/
pgpn4H6ZJWlb0.pgp
Description: PGP signature
_______________________________________________ code-quality mailing list code-quality@python.org https://mail.python.org/mailman/listinfo/code-quality