Well, no, I was trying to avoid actually importing any of the modules. I thought it might be hard to get them all imported without working through required prerequisites - I mean, when importing them without the plugin loading mechanism - and having them all at once as live Leo code might be questionable, too. *Inspect* works on loaded code. If I wanted to load the code, I could just have asked for the docstring directly, I think, no need for *inspect*.
On Sunday, June 6, 2021 at 3:34:49 PM UTC-4 Edward K. Ream wrote: > On Sat, Jun 5, 2021 at 9:05 AM tbp1...@gmail.com <tbp1...@gmail.com> > wrote: > >> There are a lot of plugins for Leo, but it's hard to know what they all >> do. Some of them are mentioned in various Leo documentation, but I find it >> hard to find and understand when I wonder about a particular one. So I >> wrote a Python script to extract the docstring from each .py file in the >> plugins directory. The script and results are attached. > > > Thanks for this. I'll look at folding the text into LeoDocs.leo. > >> >> It's a little tricky to do because the various docstrings are formatted >> differently, use both kinds of multi-line quotes (""" and '''), and have >> sentinals. The script extracts the first three non-blank, non-sentinal >> docstring lines. Note that the script hard-codes my own plugins directory, >> so make sure to change that if you want to use it yourself. >> > > Did you consider using python's "inspect" library? That *might* be more > robust. > > 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 leo-editor+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/leo-editor/c359f351-5389-4533-b323-25ff11f43550n%40googlegroups.com.