def open_file(self, path):
"""Open a file and register it as a dependency."""
path = os.path.normpath(path)
path = utils.relative_path(None, path)
path = nodes.reprunicode(path)
self.state.document.settings.record_dependencies.add(path)
return open(path, 'r')
评论列表
文章目录