Hi,
I have written a software component that relies on a configuration file. For clarity, I want to document the structure of the configuration file by adding an example file in the docstring of the relevant class. For obvious reasons, it should appear in fixed-width font.
The only way I know is adding >>>
before each line, which is bad because doctest might think this is a Python code segment and lose its wits. Moreover, it looks really ugly:
>>>
[db]
>>>
port = 5432
>>>
name = adam_db
...
What I really want is:
[db]
port=5432
name=adam_db
...
In a fixed-width font.
Any ideas?
Thanks,
Adam