On Wed, 26 Mar 2008 11:01:13 -0500 "Edward K. Ream" <[EMAIL PROTECTED]> wrote:
> Hmm. I think the docs are adequate. They refer people to the > sources for details. "The c.config class has the following getters. See the configSettings in leoCommands.py for details" configSettings in leoCommands.py just shows me a bunch of delegations to g.app.config, about which I know nothing and see no obvious way of learning > In this case: > Code-->Core classes...-->@thin leoConfig.py-->class > configClass-->Getters... (g.app.config)-->getBool So with this pointer I at least know what g.app.config is. > getDefault has a 'default' keyword that you can use to specify a > default to be used when there is no setting given. ug, you mean get<whatever> has a 'default' keyword - I've been looking for getDefault... no, I take that back, I don't see a default param for get<whatever>, only getBool. But while following getString() to get() I've stumbled over exists() to see if the setting exists at all, which allows you to distinguish the two cases where None is returned for @string Ok, I think I'm there now. Oh, looks like leoCommands.py doesn't have a delegate for exists()... I guess I can grab it from g.app.conf. In general I don't like having to read the source to derive the API. I ran epydoc on src/*.py and plugins/*.py, but that's only moderately useful. It would be good but the size of files like leoCommands.py chokes my browser when it tries to jump to the code for a particular function. Then again, if you have to read the source, it's probably best to read it in Leo in leoPyRef.leo, leo works quite well for navigating large sets of python files :-) It's just easier when you already know where you're going. grep '^[[:space:]]*def[[:space:]]' leo/src/*.py | wc -l 5234 Wow. Cheers -Terry --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "leo-editor" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en -~----------~----~----~----~------~----~------~--~---
