The documentation for __init__.py
is quite hard to find. I can't find a place that explains all the things you can do in this file. The Python module documentation barely even mentions __init__.py
nor that you can use __all__
for from module import *
What I want is for my module to be callable like:
main.py
import module
module()
module/__ init __.py
def __call__(self): # self here cause modules are loaded as objects?
print 'callable'