firestryker's picture
download
raw
1.08 kB
# $Id: pseudoxml.py 10136 2025-05-20 15:48:27Z milde $
# Author: David Goodger <goodger@python.org>
# Copyright: This module has been placed in the public domain.
"""
Simple internal document tree Writer, writes indented pseudo-XML.
"""
from __future__ import annotations
__docformat__ = 'reStructuredText'
from docutils import writers, frontend
class Writer(writers.Writer):
supported = ('pseudoxml', 'pprint', 'pformat')
"""Formats this writer supports."""
settings_spec = (
'"Docutils pseudo-XML" Writer Options',
None,
(('Pretty-print <#text> nodes.',
['--detailed'],
{'action': 'store_true', 'validator': frontend.validate_boolean}),
)
)
config_section = 'pseudoxml writer'
config_section_dependencies = ('writers',)
output = None
"""Final translated form of `document`."""
def translate(self) -> None:
self.output = self.document.pformat()
def supports(self, format) -> bool:
"""This writer supports all format-specific elements."""
return True

Xet Storage Details

Size:
1.08 kB
·
Xet hash:
17e9a2423bea5efb3ae2bfe003b7b5ae1c92c376dbed8f3d0795b2e8917a6e23

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.