parameters: (path_to_documentation, chapter_lines)
return_statement: return lines
docstring: func(path_to_doc._tx, [new_chapter]) -> [regenerated_documentation]
  
     Opens the documentation and searches for the text section
     separated through the global marks START_MARK/END_MARK. Returns
     the opened file with that section replaced by chapter_lines.
docstring_summary: func(path_to_doc._tx, [new_chapter]) -> [regenerated_documentation]
docstring_tokens: func ( path_to_doc . _tx [ new_chapter ] ) - > [ regenerated_documentation ]
function: def replace_example_chapter(path_to_documentation, chapter_lines):
     """func(path_to_doc._tx, [new_chapter]) -> [regenerated_documentation]
  
     Opens the documentation and searches for the text section
     separated through the global marks START_MARK/END_MARK. Returns
     the opened file with that section replaced by chapter_lines.
     """
     lines = []
     file = open(path_to_documentation, "rt")
     state = 0
     for line in file.readlines():
        if state == 0:
           lines.append(line)
           if string.find(line, START_MARK) > 0:
              state = state + 1
        elif state == 1:
           if string.find(line, END_MARK) > 0:
              lines.extend(chapter_lines)
              lines.append(line)
              state = state + 1
        else:
           lines.append(line)
  
     return lines
function_tokens: def replace_example_chapter ( path_to_documentation , chapter_lines ) : lines = [ ] file = open ( path_to_documentation , "rt" ) state = 0 for line in file . readlines ( ) : if state == 0 : lines . append ( line ) if string . find ( line , START_MARK ) > 0 : state = state + 1 elif state == 1 : if string . find ( line , END_MARK ) > 0 : lines . extend ( chapter_lines ) lines . append ( line ) state = state + 1 else : lines . append ( line ) return lines