Package glue :: Module markup
[hide private]
[frames] | no frames]

Module markup

source code

This is markup.py - a Python module that attempts to make it easier to generate HTML/XML from a Python program in an intuitive, lightweight, customizable and pythonic way.

The code is in the public domain.

Version: 1.9 as of 1 October 2012.

Documentation and further info is at http://markup.sourceforge.net/

Please send bug reports, feature requests, enhancement ideas or questions to nogradi at gmail dot com.

Installation: drop markup.py somewhere into your Python path.


Version: 1.9

Date: 1 October 2012

Classes [hide private]
  ArgumentError
  ClosingError
  CustomizationError
  DeprecationError
  InvalidElementError
  MarkupError
All our exceptions subclass this.
  ModeError
  OpeningError
  _oneliner
An instance of oneliner returns a string corresponding to one element.
  dummy
A dummy class for attaching attributes.
  element
This class handles the addition of a new element.
  page
This is our main class representing a document.
  russell
A dummy class that contains anything.
Functions [hide private]
 
_argsdicts(args, mydict)
A utility generator that pads argument list and dictionary values, will only be called with len( args ) = 0, 1.
source code
 
_escape(text, newline=False)
Escape special html characters.
source code
 
_totuple(x)
Utility stuff to convert string, int, long, float, None or anything to a usable tuple.
source code
 
escape(text, newline=False)
Escape special html characters.
source code
 
unescape(text)
Inverse of escape.
source code
Variables [hide private]
  __package__ = 'glue'
  doctype = <glue.markup.dummy instance at 0x7f39066b90e0>
  given_oneliner = <glue.markup._oneliner instance at 0x7f39066b...
  oneliner = <glue.markup._oneliner instance at 0x7f3906720fc8>
  upper_oneliner = <glue.markup._oneliner instance at 0x7f39066b...
Variables Details [hide private]

given_oneliner

Value:
<glue.markup._oneliner instance at 0x7f39066b9098>

upper_oneliner

Value:
<glue.markup._oneliner instance at 0x7f39066b9050>