call site 2 for path.local.visit
apigen/testing/test_apigen_example.py - line 431
429
430
431
432
433
434
435
436
   def test_build_source_page(self):
       self.spb.build_pages(self.fs_root)
->     self.linker.replace_dirpath(self.base, False)
       funcsource = self.base.join('source/pkg/func.py.html')
       assert funcsource.check(file=True)
       html = funcsource.read()
       print html
       assert ('<span class="alt_keyword">def</span> func(arg1)') in html
apigen/linker.py - line 85
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
   def replace_dirpath(self, dirpath, stoponerrors=True):
       """ replace temporary links in all html files in dirpath and below """
->     for fpath in dirpath.visit('*.html'):
           html = fpath.read()
           while 1:
               match = self._reg_tempurl.search(html)
               if not match:
                   break
               tempurl = match.group(1)
               try:
                   html = html.replace('"' + tempurl + '"',
                                       '"' + self.get_target(tempurl,
                                               fpath.relto(dirpath)) + '"')
               except KeyError:
                   if stoponerrors:
                       raise
                   html = html.replace('"' + tempurl + '"',
                                       '"apigen.notfound://%s"' % (tempurl,))
           fpath.write(html)