design - Best practices for creating a project utilities module? -


does know of best practices around creating utilities module or class specific project? have project i've been working on has 3 different moving pieces, keep in same project. directory structure looks like:

├── dir_a │  └── driver.py ├── dir_b │  └── driver.py ├── dir_c    └── driver.py 

each driver has common functions, want rip them out , throw them in utilities module project looks this:

├── dir_a │  └── driver.py ├── dir_b │  └── driver.py ├── dir_c │  └── driver.py └── utilities     ├── __init__.py     └── utilities.py 

the problem i'm having i'm finding out driver files can't import utilities module without utilities dir being in pythonpath. best practice creating or adding project-specific modules , classes in general? adding utilities pythonpath seems clunky , inelegant. ideally project self-contained , wouldn't dependent on modifying environment run.


Comments

Popular posts from this blog

javascript - oscilloscope of speaker input stops rendering after a few seconds -

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -