I have to import file "BalancedTree" from DictsOrganizations to current file. (Organization of files in picture) If I use sys.path.append, I break PEP-8 rules, because there are another imported modules after this code. I also add into DictsOrganizations init.py, but there is error "Unable to import "DictsOrganizations"
Asked
Active
Viewed 402 times
3
-
1You are also [breaking PEP-8](https://www.python.org/dev/peps/pep-0008/#package-and-module-names) by giving your packages and modules names ike `BalancedTree` and `DictsOrganizations` :\ Anyway, you can set up the `PYTHONPATH` environment variable before running your script. – zvone May 22 '18 at 22:38
-
1Possible duplicate of [Best practises for imports in Python 3 packages and scripts](https://stackoverflow.com/questions/50185897/best-practises-for-imports-in-python-3-packages-and-scripts) – Davis Herring May 23 '18 at 02:28