> > One thing you will have to decide is where the plugin should live. You > don't want it to be in the Leo codebase since it's personal. Leo will load > plugins from sys.path if you list them in the @enabled-plugins setting if > you give the module name without the ".py" extension. So you have to get > your plugin on sys.path. Here is how I do it (using Windows paths). In > *Lib.sitepackages > *I place a .pth file, *custom.pth*. This file walks up the the Python > directory in %APPDATA%\Python: > > # Look in AppData\Roaming\Python for other files and packages. > ..\..\ > > In this Python directory I created *pycustomize\leo.* Now I can import a > module from that directory: > > from pycustomize.leo import my_plugin > > I decided to set up the location of these files (I have some others in > *pycustomizeI*) like this so they wouldn't need to be copied to each new > Python install. I only need to remember to copy *custom.pth* to the new > install. >
Nice tips. Thanks, Thomas! -- 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/CA%2BUQrQxZhu_AkRhpoE%2BA9T0_-q%2B%3D5bte8ocq_Xf57aVniASWEA%40mail.gmail.com.
