Hello I’m trying to create a plugin-based program similar to Anki. Can anyone point me to the files that does this logic? Thanks
Add-ons are just Python modules that Anki imports normally: anki/addons.py at e33bed2a25983cd41830169327e46d1baf710564 · ankitects/anki · GitHub
Sorry it took a while for me to research on what’s happening in the code.
So from what I understand, loading an add-on is simply importing a python module. Now this is easy to implement in a dev environment (i.e. cloning the repo and running python runanki.py) since the AddonManager can download the addon and load it by importing from the directory.
However, in the packaged/built setup (i.e. using py2exe or pyinstaller), dynamic imports cannot be used. So my question is how does anki work around this? Is there a way to build an app so that addons can still be usable?