This namespace module provides classes that can be used for generating documentation (in HTML, DocBook and XSL-FO).
def _getmodulename(thing):
def getdoc(thing, format):
def getsourceline(obj):
def _namekey(obj, name):
def _codeheader(thing, name, type):
class _stack(object):
def __init__(self, context, obj):
selfdef __enter__(self):
selfdef __exit__(self, type, value, traceback):
selfdef explain(thing, name=None, format=None, context=[]):
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.
class base(ll.xist.xsc.Element):
The base of all element classes. Used for dispatching to conversion targets.
class Context(ll.xist.xsc.Context):
def __init__(self):
selfdef dedent(self):
selfdef indent(self):
selfdef labelindent(self):
selfdef convert(self, converter):
selfdef convert_doc(self, converter):
selfclass block(base):
Base class for all block level elements.
def convert_html(self, converter):
selfclass inline(base):
Base class for all inline elements.
def convert_html(self, converter):
selfclass abbr(inline):
Abbreviation.
class Attrs(ll.xist.xsc.Element.Attrs):
class title(ll.xist.xsc.TextAttr):
class lang(ll.xist.xsc.TextAttr):
def convert_docbook(self, converter):
selfdef convert_html(self, converter):
selfdef convert_fo(self, converter):
selfdef __unicode__(self):
selfclass tab(ll.xist.xsc.Element):
Used for displaying a tab character in the HTML output.
def convert(self, converter):
selfclass litblock(block):
A literal text block (like source code or a shell session).
def convert_html(self, converter):
selfdef convert_fo(self, converter):
selfclass prog(litblock):
A literal listing of all or part of a program.
def convert_docbook(self, converter):
selfclass tty(litblock):
A dump of a shell session.
def convert_docbook(self, converter):
selfclass prompt(inline):
The prompt in a tty dump.
def convert_docbook(self, converter):
selfdef convert_html(self, converter):
selfdef convert_fo(self, converter):
selfclass input(inline):
Can be used inside a tty to mark the parts typed by the user.
def convert_docbook(self, converter):
selfdef convert_html(self, converter):
selfdef convert_fo(self, converter):
selfclass rep(inline):
Content that may or must be replaced by the user.
def convert_docbook(self, converter):
selfdef convert_html(self, converter):
selfdef convert_fo(self, converter):
selfclass code(inline):
def convert_fo(self, converter):
selfdef convert_html(self, converter):
selfclass option(code):
An option for a software command.
def convert_docbook(self, converter):
selfdef convert_html(self, converter):
selfclass lit(code):
Inline text that is some literal value.
def convert_docbook(self, converter):
selfdef convert_html(self, converter):
selfclass func(code):
The name of a function or subroutine, as in a programming language.
def convert_docbook(self, converter):
selfclass meth(code):
The name of a method or memberfunction in a programming language.
def convert_docbook(self, converter):
selfclass attr(code):
The name of an attribute of a class/object.
def convert_docbook(self, converter):
selfclass prop(code):
The name of a property in a programming language.
def convert_docbook(self, converter):
selfclass class_(code):
The name of a class, in the object-oriented programming sense.
def convert_docbook(self, converter):
selfclass exc(code):
The name of an exception class.
def convert_docbook(self, converter):
selfclass markup(code):
A string of formatting markup in text that is to be represented literally.
def convert_docbook(self, converter):
selfdef convert_html(self, converter):
selfclass self(code):
Use this class when referring to the object for which a method has been called, e.g.:
this function fooifies the object <self/>;.
def convert_docbook(self, converter):
selfdef convert_html(self, converter):
selfdef convert_fo(self, converter):
selfclass self_(code):
Use this class when referring to the object for which a method has been called, e.g.:
this function fooifies the object <self/>;.
def convert_docbook(self, converter):
selfdef convert_html(self, converter):
selfdef convert_fo(self, converter):
selfclass cls(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/>.
def convert_docbook(self, converter):
selfdef convert_html(self, converter):
selfdef convert_fo(self, converter):
selfclass var(code):
The name of a function or method argument.
def convert_docbook(self, converter):
selfclass mod(code):
The name of a Python module.
def convert_docbook(self, converter):
selfdef convert_html(self, converter):
selfclass file(code):
The name of a file.
def convert_docbook(self, converter):
selfdef convert_html(self, converter):
selfclass dir(code):
The name of a directory.
def convert_docbook(self, converter):
selfclass user(code):
The name of a user account.
def convert_docbook(self, converter):
selfclass host(code):
The name of a computer.
def convert_docbook(self, converter):
selfclass const(code):
The name of a constant.
def convert_docbook(self, converter):
selfclass data(code):
The name of a data object.
def convert_docbook(self, converter):
selfclass app(inline):
The name of a software program.
class Attrs(ll.xist.xsc.Element.Attrs):
class moreinfo(ll.xist.xsc.URLAttr):
def convert_docbook(self, converter):
selfdef convert_html(self, converter):
selfdef convert_fo(self, converter):
selfclass h(base):
The text of the title of a section or an example.
def convert_docbook(self, converter):
selfdef convert_html(self, converter):
selfdef convert_fo(self, converter):
selfclass section(block):
A recursive section.
class Attrs(ll.xist.xsc.Element.Attrs):
class role(ll.xist.xsc.TextAttr):
class id(ll.xist.xsc.IDAttr):
def convert_docbook(self, converter):
selfdef convert_html(self, converter):
selfdef convert_fo(self, converter):
selfclass p(block):
A paragraph.
class Attrs(ll.xist.xsc.Element.Attrs):
class type(ll.xist.xsc.TextAttr):
def convert_docbook(self, converter):
selfdef convert_html(self, converter):
selfdef convert_fo(self, converter):
selfclass dt(block):
A term inside a dl.
def convert_docbook(self, converter):
selfdef convert_html(self, converter):
selfdef convert_fo(self, converter):
selfclass li(block):
A wrapper for the elements of a list item in ul or ol.
def convert_docbook(self, converter):
selfdef convert_html(self, converter):
selfdef convert_fo(self, converter):
selfclass dd(block):
A wrapper for the elements of a list item dl.
def convert_docbook(self, converter):
selfdef convert_html(self, converter):
selfdef convert_fo(self, converter):
selfclass list(block):
Common baseclass for ul, ol and dl.
class ul(list):
A list in which each entry is marked with a bullet or other dingbat.
def convert_docbook(self, converter):
selfdef convert_html(self, converter):
selfdef convert_fo(self, converter):
selfclass ol(list):
A list in which each entry is marked with a sequentially incremented label.
def convert_docbook(self, converter):
selfdef convert_html(self, converter):
selfdef convert_fo(self, converter):
selfclass dl(list):
A list in which each entry is marked with a label.
def convert_docbook(self, converter):
selfdef convert_html(self, converter):
selfdef convert_fo(self, converter):
selfclass example(block):
A formal example.
def convert_docbook(self, converter):
selfdef convert_html(self, converter):
selfdef convert_fo(self, converter):
selfclass a(inline):
A hypertext link.
class Attrs(ll.xist.xsc.Element.Attrs):
class href(ll.xist.xsc.URLAttr):
class hreflang(ll.xist.xsc.TextAttr):
def convert_docbook(self, converter):
selfdef convert_html(self, converter):
selfdef convert_fo(self, converter):
selfclass xref(inline):
An internal cross reference.
class Attrs(ll.xist.xsc.Element.Attrs):
class ref(ll.xist.xsc.TextAttr):
def convert_docbook(self, converter):
selfdef convert_html(self, converter):
selfdef convert_fo(self, converter):
selfclass email(inline):
An email address.
def convert_docbook(self, converter):
selfdef convert_html(self, converter):
selfdef convert_fo(self, converter):
selfclass em(inline):
Emphasized text.
def convert_docbook(self, converter):
selfdef convert_html(self, converter):
selfdef convert_fo(self, converter):
selfclass strong(inline):
Emphasized text.
def convert_docbook(self, converter):
selfdef convert_html(self, converter):
selfdef convert_fo(self, converter):
selfclass pyref(inline):
Reference to a Python object: module, class, method, property or function.
class Context(ll.xist.xsc.Context):
def __init__(self):
selfclass Attrs(ll.xist.xsc.Element.Attrs):
class class_(ll.xist.xsc.TextAttr):
class module(ll.xist.xsc.TextAttr):
class method(ll.xist.xsc.TextAttr):
class property(ll.xist.xsc.TextAttr):
class function(ll.xist.xsc.TextAttr):
def convert(self, converter):
selfclass fodoc(base):
def convert(self, converter):
self