I have a custom Python egg I've written, which I cannot get the submodule (or nested module) to load externally. I've been able to load a root-level module just fine.
Here's the obfuscated structure:
my_egg/ my_egg/ __init__.py (empty file) module_one.py my_subdir\ __init__.py (empty file) module_two.py setup.py
Importing module_one works:
from my_egg import module_one
But I cannot seem to get module_two to import. Here's what I've tried:
from my_egg.my_subdir import module_two
from my_egg import my_subdir.module_two
from my_egg.my_subdir.module_two import *
None of those worked. Here's what my setup.py looks like:
from setuptools import setup
setup(name='my_egg',
version='0.1',
packages=['my_egg'],
test_suite='nose.collector',
tests_require=['nose'],
zip_safe=False)