root/galaxy-central/eggs/docutils-0.4-py2.6.egg/docutils/writers/pseudoxml.py

リビジョン 3, 0.8 KB (コミッタ: kohda, 14 年 前)

Install Unix tools  http://hannonlab.cshl.edu/galaxy_unix_tools/galaxy.html

行番号 
1# Authors: David Goodger
2# Contact: goodger@users.sourceforge.net
3# Revision: $Revision: 1645 $
4# Date: $Date: 2003-08-27 22:50:43 +0200 (Wed, 27 Aug 2003) $
5# Copyright: This module has been placed in the public domain.
6
7"""
8Simple internal document tree Writer, writes indented pseudo-XML.
9"""
10
11__docformat__ = 'reStructuredText'
12
13
14from docutils import writers
15
16
17class Writer(writers.Writer):
18
19    supported = ('pprint', 'pformat', 'pseudoxml')
20    """Formats this writer supports."""
21
22    config_section = 'pseudoxml writer'
23    config_section_dependencies = ('writers',)
24
25    output = None
26    """Final translated form of `document`."""
27
28    def translate(self):
29        self.output = self.document.pformat()
30
31    def supports(self, format):
32        """This writer supports all format-specific elements."""
33        return 1
Note: リポジトリブラウザについてのヘルプは TracBrowser を参照してください。