As the screenshot, DraftWindow.py is at the same dir as init.py is,
in init.py, I write from DraftWindow import DraftWindow and use it, when starting anki, get the alert message.
from DraftWindow import DraftWindow
No Module named 'DraftWindow`? Why? Could you please help advise how to correctly import DraftWindow?
Thanks a lot.
For Python questions, there are generally better resources than the Anki forum: 6. Modules — Python 3.10.4 documentation But to quickly answer your question, from .DraftWindow import Draftwindow should work.
from .DraftWindow import Draftwindow
Bonus: PEP 8 – Style Guide for Python Code | peps.python.org