~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to ivle/webapp/help/__init__.py

  • Committer: David Coles
  • Date: 2009-08-13 05:27:03 UTC
  • mto: (1294.2.124 ui-the-third)
  • mto: This revision was merged to the branch mainline in revision 1353.
  • Revision ID: coles.david@gmail.com-20090813052703-b8bwfkty7s97k8c8
Add some docstrings to the very confusing functions.

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
from ivle.webapp import ApplicationRoot
12
12
 
13
13
def generate_toc(plugins):
14
 
    toc = HelpTree(None, None, {})
 
14
    """Create a root HelpTree with content from the plugins."""
 
15
    toc = HelpTree(None, 'Help', {})
15
16
    for plugin in plugins:
16
17
        if hasattr(plugin, 'help'):
17
18
            # Get the dir the plugin resides in
20
21
    return toc
21
22
 
22
23
def add_dict(newdict, curdict, plugin):
 
24
    """Deeply merge curdict into newdict."""
23
25
    for key in curdict:
24
26
        if isinstance(curdict[key], dict):
25
27
            if key not in newdict: