I understand that there are many questions on this topic, but most of the answers that I have seen describe complex workarounds for problems that should, it seems to me, be simple. Here is my directory structure:
Mapper/
LICENSE.txt
README.txt
setup.py
bin/
# nothing here, yet
mapper/
__init__.py
process.py
where.py
# ...
binconvert/
__init__.py
tocsv.py
todict.py
# ...
I would like to use absolute paths for all my locally designed modules to reduce confusion and avoid the errors mentioned here .
However, I have a few problems with this. When I run process.py, in which I import tocsv.py, for example,
from mapper.binconvert import tocsv
I get an error: ModuleNotFoundError: No module named 'mapper'
I know what I could do from binconvert import tocsv, but, as I said, I try to ensure that all my locally developed modules import absolute paths.
, , tocsv.py, where.py :
from mapper import where
, import, , . , , python :
( ), , siblings. , sound.filters.vocoder sound.effects package, sound.effects import echo.
sound/ Top-level package
__init__.py Initialize the sound package
formats/ Subpackage for file format conversions
__init__.py
wavread.py
wavwrite.py
aiffread.py
aiffwrite.py
auread.py
auwrite.py
...
effects/ Subpackage for sound effects
__init__.py
echo.py
surround.py
reverse.py
...
filters/ Subpackage for filters
__init__.py
equalizer.py
vocoder.py
karaoke.py
...