HappyDoc formatting docstring

Flores Bakker fbakker at psy.uva.nl
Fri Jun 8 09:14:56 EDT 2001


I have a problem using HappyDoc: example code lines in docstrings are
appended after each other in HappyDoc generated HTML text.for example:

class Jantje:
    '''
    ExampleCode:

    >>> aBankAccount=BankAccount()
    >>> aBankAccount.deposit(30)
    >>> aBankAccount.withdrawal(10)
    >>> aBankAccount.balance==20
    1
    '''


This becomes in HappyDoc generated HTML text:


'''
    ExampleCode:

    >>>
aBankAccount=BankAccount>>>aBankAccount.deposit(30)>>>aBankAccount.withdrawa
l>>>aBankAccount.balance==20 1
    '''
As one can see, the code lines do not begin each time on a new line, but are
appended to te last line.

How can one force HappyDoc to verbatim take the example code (propably using
something like '::') so that code lines in docstrings each will end up on a
new line in HappyDoc generated HTML-text?
How can one force HappyDoc to put a line of a docstring **after** another
line without using blank lines between them in the docstring?

Flores Bakker
fbakker at psy.uva.nl






More information about the Python-list mailing list