Previous Next blank.gif blank.gif

Class Frame - Define the characteristics of an individual frame.


SYNOPSIS

import HTMLgen
class Frame(AbstractTag)
  string __module__ = 'HTMLgen'
  dictionary attr_dict = {'frameborder': '', 'scrol ...
  string attr_template = '%(align)s%(bordercolor)s% ...
  tuple attrs = ('align', 'bordercolor', ' ...
  string tagname = 'FRAME'

  # Methods inherited by Frame from AbstractTag
  def __add__(self, other)
  def __call__(self, text)
  def __init__(self, *contents, **kw)
  def __len__(self)
  def __setattr__(self, name, value)
  def __str__(self)
  def append(self, *items)
  def copy(self)
  def empty(self)
  def last(self)
  def markup(self, rex=None, marker=None, **kw)
  def prepend(self, *items)

DESCRIPTION

def __add__(self, other)

Support self + list

def __call__(self, text)

Enable instances to be callable as text processing functions.

For Example:

  >>> S = HTMLgen.Strong()
  >>> print S('Hi!')
  >>> <STRONG>Hi!</STRONG>

def __len__(self)

Return the integer length of the container list.

def __setattr__(self, name, value)

Intercept attribute assignments.

If the attribute is a legal HTML tag attribute add it to the dict used for substitution in __str__, otherwise just set it as an instance attribute.

def __str__(self)

Generate an HTML formatted string for this object.

def append(self, *items)

Append one or more items to the end of the container.

def copy(self)

Return a full copy of the object.

def empty(self)

Empty the contents of the container.

def last(self)

Return a reference to the last item in the container.

def markup(self, rex=None, marker=None, **kw)

Markup the contained text matching a regular expression with a tag class instance or function.

Arguments

rex
a regular expression object or pattern which will be used to match all text patterns in the Paragraph body. Must have a single group defined. Group 1 is the matching text that will be marked. Default to all parenthetical text.
marker
an HTMLgen class instance to which the found text will be sent for wrapping (using its __call__ method). Default is Emphasis.

Keywords

collapse
When set to 1 removes the non-grouped matching text from the output. Default 0.

Returns the number of matching text groups.

def prepend(self, *items)

Prepend one or more items to the top of the container.

Keywords Arguments

src
is a HREF which points to the initial contents of the frame.
name
is the window name used by others to direct content into this frame.
marginwidth
is the number of pixels used to pad the left and right sides of the frame.
marginheight
is the number of pixels used to pad the top and bottom sides of the frame.
scrolling
is used to indicate scrolling policy set to 'yes'|'no'|'auto'
noresize
is a flag which instructs the browser to disallow frame resizing. set to non zero lock size ( noresize=1 ).

SEE ALSO

HTMLgen

AbstractTag


Previous Next blank.gif blank.gif
Buzz.gif

Copyright © Robin Friedrich
All Rights Reserved
Comments to author: friedrich@pythonpros.com
Generated: Tue Apr 20, 1999