I have created a folder named “custom_module” and I have the __init__.py inside the folder which contains:
__all__ = [
'Submodule1',
'Submodule2'
]
From what documentation I read I should be able to call import custom_module and get access to the package, however this isn’t happening. How can I make python recognize my package? I am using python 3.2
Update:
The package is not located in the python folder. How does the python environment find it, so I can successfully import it by name.
sys.pathholds the Python search path. Before trying toimportyour modules and packages, set it to include your path:More detail in the Python docs and in this question