Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(5)  |  Call(5)  |  Derive(0)  |  Import(0)
Returns a ``Document`` object.

.. doctest::

    >>> import rst
    >>> doc = rst.Document('Title of the report')
    >>> print doc.get_rst()
    Title of the report

src/r/s/rst-0.1/examples/example1.py   rst(Download)
def main():
    doc = rst.Document('Title of the report')
    para = rst.Paragraph('Just another paragraph. We need few more of these.')
    sec = rst.Section('Another', 2)

src/r/s/rst-0.1/tests.py   rst(Download)
    def test_title(self):
        "test the title of the document"
        doc = rst.Document(u("Sample document"))
        text = doc.get_rst()
        actual_text = u("""===============
    def test_paragraph(self):
        "test the paragraph in the document"
        doc = rst.Document(u(""))
        para = rst.Paragraph(u('This is a paragraph.'))
    def test_sections(self):
        "test the sections in the document"
        doc = rst.Document(u("Title"))
        sec = rst.Section('Section One', 2)
    def test_orderedlist(self):
        "test the OrderedList in the document"
        doc = rst.Document(u("T"))
        blt = rst.Orderedlist()