I have a project which has this hierarchy
tasker/
table/
__init__.py
user.py
task.py
...
__init__.py
tasker.py
every file inside table folder (except __init__.py) contains a class that has a same name as the file name except the first letter is capitalized. I want to call and instantiate every class inside table folder in tasker.py. I can do it by writing
import table
inside tasker.py. But, it turns out that I have to write for example
table.user.User()
to instantiate class inside user.py and it looks very ugly. Is there any way so that I only type at least
user.User()
or even better,
User()
to instantiate those classes?
Note: Every files inside table folder is dinamically changed. I might add or remove file in table folder.