goulib.markup

simple HTML/XML generation (forked from markup)

# This code is in the public domain, it comes # with absolutely no warranty and you can do # absolutely whatever you want with it.

Functions

_argsdicts(args, mydict)

A utility generator that pads argument list and dictionary values, will only be called with len( args ) = 0, 1.

_escape(text[, newline])

Escape special html characters.

_totuple(x)

Utility stuff to convert string, int, long, float, None or anything to a usable tuple.

cgiprint([line, unbuff, line_end])

Print to the stdout.

escape(text[, newline])

Escape special html characters.

style_dict2str(style)

style_str2dict(style)

tag(tag, between, **kwargs)

generate full tag.

unescape(text)

Inverse of escape.

Classes

_oneliner([case])

An instance of oneliner returns a string corresponding to one element.

dummy()

A dummy class for attaching attributes.

element(tag[, case, parent])

This class handles the addition of a new element.

page([mode, case, onetags, twotags, ...])

This is our main class representing a document.

russell()

A dummy class that contains anything.

Exceptions

ArgumentError(tag)

ClosingError(tag)

CustomizationError()

DeprecationError(tag)

InvalidElementError(tag, mode)

MarkupError

All our exceptions subclass this.

ModeError(mode)

OpeningError(tag)