Table of Contents

Module: parsecomments ../HappyDoc-r2_1/happydoclib/parsecomments.py

Parse comment information from a module.

Imported modules   
from StreamFlushTest import StreamFlushTest
import re
Functions   
extractComments
  extractComments 
extractComments (
        text,
        extractRe=re.compile( '^((?P<blankline>\s*$)|(?P<namedobj>(?P<indent>\s*)(?P<nametype>(class|def))\s+(?P<name>[0-9A-Za-z_]+))|(?P<commentline>\s*#+(?P<comment>.*)))' ).search,
        ignoreRe=re.compile( '\s*[+-=#][ +-=#]*\s*$' ).match,
        )

Given a block of Python source, extract the comments.

The comment text is associated with nearby named objects (functions, methods, classes, etc.). This function returns a dictionary of names and the associated comment text.

Arguments

text
The Python source to be scanned.
Classes   

ParseCommentsTest

ParseStack

Helper class for extractComments function in this module.


Table of Contents

This document was automatically generated on Sat Aug 24 16:57:23 2002 by HappyDoc version 2.1