Package docutils :: Module nodes :: Class Text
[show private | hide private]
[frames | no frames]

Class Text

      Node --+
             |
UserString --+
             |
            Text


Instances are terminal nodes (leaves) containing text only; no child nodes or attributes. Initialize by passing a string to the constructor. Access the text itself with the astext method.
Method Summary
  __init__(self, data, rawsource)
  __len__(self)
  __repr__(self)
  astext(self)
  copy(self)
Return a copy of self.
  get_children(self)
Text nodes have no children.
  pformat(self, indent, level)
Return an indented pseudo-XML representation, for test purposes.
  shortrepr(self)
  _dom_node(self, domroot)
    Inherited from Node
  __nonzero__(self)
Node instances are always true, even if they're empty.
  asdom(self, dom)
Return a DOM fragment representation of this Node.
  setup_child(self, child)
  walk(self, visitor)
Traverse a tree of Node objects, calling visit_... methods of visitor when entering each node.
  walkabout(self, visitor)
Perform a tree traversal similarly to Node.walk() (which see), except also call depart_... methods before exiting each node.
    Inherited from UserString
  __add__(self, other)
  __cmp__(self, string)
  __complex__(self)
  __contains__(self, char)
  __float__(self)
  __getitem__(self, index)
  __getslice__(self, start, end)
  __hash__(self)
  __iadd__(self, other)
  __imul__(self, n)
  __int__(self)
  __long__(self)
  __mul__(self, n)
  __radd__(self, other)
  __rmul__(self, n)
  __str__(self)
  capitalize(self)
  center(self, width)
  count(self, sub, start, end)
  decode(self, encoding, errors)
  encode(self, encoding, errors)
  endswith(self, suffix, start, end)
  expandtabs(self, tabsize)
  find(self, sub, start, end)
  index(self, sub, start, end)
  isalnum(self)
  isalpha(self)
  isdecimal(self)
  isdigit(self)
  islower(self)
  isnumeric(self)
  isspace(self)
  istitle(self)
  isupper(self)
  join(self, seq)
  ljust(self, width)
  lower(self)
  lstrip(self, sep)
  replace(self, old, new, maxsplit)
  rfind(self, sub, start, end)
  rindex(self, sub, start, end)
  rjust(self, width)
  rstrip(self, sep)
  split(self, sep, maxsplit)
  splitlines(self, keepends)
  startswith(self, prefix, start, end)
  strip(self, sep)
  swapcase(self)
  title(self)
  translate(self, *args)
  upper(self)

Class Variable Summary
str tagname = '#text'
    Inherited from Node
NoneType document = None                                                                  
NoneType line = None                                                                  
NoneType parent = None                                                                  
NoneType source = None                                                                  

Method Details

copy(self)

Return a copy of self.
Overrides:
docutils.nodes.Node.copy (inherited documentation)

get_children(self)

Text nodes have no children. Return [].

pformat(self, indent='    ', level=0)

Return an indented pseudo-XML representation, for test purposes.
Overrides:
docutils.nodes.Node.pformat (inherited documentation)

Class Variable Details

tagname

Type:
str
Value:
'#text'                                                                

Generated by Epydoc 2.0 on Tue Jul 22 05:31:36 2003 http://epydoc.sf.net