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 incontext
, i.e. a list of names of objects into whichthing
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.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.input[source]
Bases:
inline
Can be used inside a
tty
to mark the parts typed 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.ul[source]
Bases:
list
A list in which each entry is marked with a bullet or other dingbat.