#1880 <https://github.com/leo-editor/leo-editor/issues/1880> reports a problem loading plugins and suggests a fix. Here I'll summarize what I did and how to load plugins
*What I did* I made the fix suggested in the initial bug report. In some sense this is all that was needed. However, the old code in plugins.regularizeName was extremely confusing. I simplified that code and added comments. *How to load plugins* Most users will enable plugins using @enabled-plugins. This should work *exactly* as before. The body text of @enabled-plugins can be either: - A file name, ending in .py, specifying a file in the leo/plugins directory. - A module name (not ending in .py) specifying a fully qualified module name, such that python can import the module (the name is on the python path). It is also possible to load plugins using an @plugin node, which must be a child of @settings. The format of can be either: @plugin x.py @plugin x.y.z Again, if a .py extension is given, the file x.py must appear in the leo/plugins directory. If no .py extension is given, then the module x.y.z must be a fully qualified module name on python's path. *Summary* Very little has actually changed. However, importing modules outside of leo/plugins now works. Edward -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/leo-editor/21fe488a-a664-4dae-9c43-72645f72716en%40googlegroups.com.
