How can I import class in anthor file in the same dir where is?

As the screenshot, is at the same dir as is,

in, I write from DraftWindow import DraftWindow and use it, when starting anki, get the alert message.

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.

Bonus: PEP 8 – Style Guide for Python Code | :wink: