I’ve got a project in which I have a directory for each aspect of my project, and I’m running into issues of importing. Namely, importing things is becoming a nasty combination of sys.path.append()s and PYTHONPATH hackery.
How do projects that are spread out across multiple directories typically deal with this kind of thing?
If you have directories for each module and you can put them under one module, then simplest solution is to use packages e.g.
so you can import like
if you can’t keep all directories under one tree, than treat them as separate projects/libs, in that case you should install them to correct python path using distutils etc read this