I'm working on a GUI app.  Let's say that I have a file main.py which is in the root directory and I want to import widgets like this:
from widgets import FancyWindow, ColorPicker
# ...
And my app is structured like so:
| main.py
+ widgets/
    | __init__.py
    | fancy_window.py
    | color_picker.py
...
IIRC, I would have to import classes from the other modules like so:
from widgets.color_picker import ColorPicker
from widgets.fancy_window import FancyWindow
So my question is if there is something I can do in widgets/__init__.py to make it so that I can do imports in the way I want to?
widgets/__init__.pyimport the things you want to be available in thewidgetpackage's namespace. i.e.from fancy_window import FancyWindow.