3

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"

enter image description here

Zoe
  • 27,060
  • 21
  • 118
  • 148
CFmoto6615
  • 108
  • 1
  • 7
  • 1
    You 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
  • 1
    Possible 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

0 Answers0