user2503795
user2503795

Reputation: 4155

Markup language of output from python's help function?

does the output of help(something) follow some markup language that is easy to format in html? I know about pydoc -w [topic] but there are two problems:

Below is some example output generated by help('def'). It has some typical characteristics of other markup languages. E.g. spaces for code blocks, ` for inline code, ** to highlight...

Any ideas?

Thanks!

Function definitions
********************

A function definition

Multiple decorators are applied in
nested fashion. For example, the following code:

   @f1(arg)
   @f2
   def func(): pass

just like a function defined by a lambda form.  The "``def``" form is
actually more powerful since it allows the execution of multiple
statements.

**Programmer's note:** Functions are first-class

Upvotes: 0

Views: 94

Answers (1)

ThiefMaster
ThiefMaster

Reputation: 318688

Most people use reStructuredText and use Sphinx to convert it to HTML and other formats.

There are no requirements on how to format the docstring of a function though.

Upvotes: 1

Related Questions