doc – Automated documentation generation

This namespace module provides classes that can be used for generating documentation (in HTML, DocBook and XSL-FO).

ll.xist.ns.doc.getdoc(thing, format)[source]

Return the docstring for thing, as an XIST node using this namespace module.

format specifies how to treat the docstring:

"plaintext"

Treat to docstring as text. This returns a single Text node.

"restructuredtext"

This interprets the docstring as ReST source and converts it to use this namespace.

"xist"

This treats the docstring as XML, which will be parsed using this namespace as the default namespace.

ll.xist.ns.doc.explain(thing, name=None, format=None, context=[])[source]

Return a XML representation of the doc string of thing, which can be a function, method, class or module.

If thing is not a module, you must pass the context in context, i.e. a list of names of objects into which thing is nested. This means the first entry will always be the module name, and the other entries will be class names.

For the meaning for format see, getdoc().

class ll.xist.ns.doc.base[source]

Bases: Element

The base of all element classes. Used for dispatching to conversion targets.

class ll.xist.ns.doc.block[source]

Bases: base

Base class for all block level elements.

class ll.xist.ns.doc.inline[source]

Bases: base

Base class for all inline elements.

class ll.xist.ns.doc.abbr[source]

Bases: inline

Abbreviation.

class ll.xist.ns.doc.tab[source]

Bases: Element

Used for displaying a tab character in the HTML output.

class ll.xist.ns.doc.litblock[source]

Bases: block

A literal text block (like source code or a shell session).

class ll.xist.ns.doc.prog[source]

Bases: litblock

A literal listing of all or part of a program.

class ll.xist.ns.doc.tty[source]

Bases: litblock

A dump of a shell session.

class ll.xist.ns.doc.prompt[source]

Bases: inline

The prompt in a tty dump.

class ll.xist.ns.doc.input[source]

Bases: inline

Can be used inside a tty to mark the parts typed by the user.

class ll.xist.ns.doc.rep[source]

Bases: inline

Content that may or must be replaced by the user.

class ll.xist.ns.doc.option[source]

Bases: code

An option for a software command.

class ll.xist.ns.doc.lit[source]

Bases: code

Inline text that is some literal value.

class ll.xist.ns.doc.func[source]

Bases: code

The name of a function or subroutine, as in a programming language.

class ll.xist.ns.doc.meth[source]

Bases: code

The name of a method or memberfunction in a programming language.

class ll.xist.ns.doc.attr[source]

Bases: code

The name of an attribute of a class/object.

class ll.xist.ns.doc.prop[source]

Bases: code

The name of a property in a programming language.

class ll.xist.ns.doc.class_[source]

Bases: code

The name of a class, in the object-oriented programming sense.

class ll.xist.ns.doc.exc[source]

Bases: code

The name of an exception class.

class ll.xist.ns.doc.markup[source]

Bases: code

A string of formatting markup in text that is to be represented literally.

class ll.xist.ns.doc.self[source]

Bases: code

Use this class when referring to the object for which a method has been called, e.g.:

this function fooifies the object <self/>;.
ll.xist.ns.doc.self_

alias of self

class ll.xist.ns.doc.cls[source]

Bases: inline

Use this class when referring to the object for which a class method has been called, e.g.:

this function fooifies the class <cls/>.
class ll.xist.ns.doc.obj[source]

Bases: code

A object of unspecified type.

class ll.xist.ns.doc.mod[source]

Bases: code

The name of a Python module.

class ll.xist.ns.doc.file[source]

Bases: code

The name of a file.

class ll.xist.ns.doc.dir[source]

Bases: code

The name of a directory.

class ll.xist.ns.doc.user[source]

Bases: code

The name of a user account.

class ll.xist.ns.doc.host[source]

Bases: code

The name of a computer.

class ll.xist.ns.doc.const[source]

Bases: code

The name of a constant.

class ll.xist.ns.doc.data[source]

Bases: code

The name of a data object.

class ll.xist.ns.doc.app[source]

Bases: inline

The name of a software program.

class ll.xist.ns.doc.h[source]

Bases: base

The text of the title of a section or an example.

class ll.xist.ns.doc.section[source]

Bases: block

A recursive section.

class ll.xist.ns.doc.p[source]

Bases: block

A paragraph.

class ll.xist.ns.doc.dt[source]

Bases: block

A term inside a dl.

class ll.xist.ns.doc.li[source]

Bases: block

A wrapper for the elements of a list item in ul or ol.

class ll.xist.ns.doc.dd[source]

Bases: block

A wrapper for the elements of a list item dl.

class ll.xist.ns.doc.list[source]

Bases: block

Common baseclass for ul, ol and dl.

class ll.xist.ns.doc.ul[source]

Bases: list

A list in which each entry is marked with a bullet or other dingbat.

class ll.xist.ns.doc.ol[source]

Bases: list

A list in which each entry is marked with a sequentially incremented label.

class ll.xist.ns.doc.dl[source]

Bases: list

A list in which each entry is marked with a label.

class ll.xist.ns.doc.example[source]

Bases: block

A formal example.

class ll.xist.ns.doc.a[source]

Bases: inline

A hypertext link.

class ll.xist.ns.doc.xref[source]

Bases: inline

An internal cross reference.

class ll.xist.ns.doc.email[source]

Bases: inline

An email address.

class ll.xist.ns.doc.em[source]

Bases: inline

Emphasized text.

class ll.xist.ns.doc.strong[source]

Bases: inline

Emphasized text.

class ll.xist.ns.doc.z[source]

Bases: inline

Put the content into double quotes.

class ll.xist.ns.doc.pyref[source]

Bases: inline

Reference to a Python object: module, class, method, property or function.