我们从Python开源项目中,提取了以下6个代码示例,用于说明如何使用docutils.utils.new_reporter()。
def parse(self): """ No parsing to do; refurbish the document tree instead. Overrides the inherited method. """ self.document = self.input # Create fresh Transformer object, to be populated from Writer # component. self.document.transformer = transforms.Transformer(self.document) # Replace existing settings object with new one. self.document.settings = self.settings # Create fresh Reporter object because it is dependent on # (new) settings. self.document.reporter = utils.new_reporter( self.document.get('source', ''), self.document.settings)