### Class Base - Specify the base URL for all relative URLs in this document.

## SYNOPSIS

    import HTMLgen

    class Base(AbstractTagSingle)
      string __module__ = 'HTMLgen'
      dictionary attr_dict = {'href': '', 'target': ''}
      string attr_template = '%(href)s%(target)s'
      tuple attrs = ('href', 'target')
      string tagname = 'BASE'

      # Methods inherited by Base from AbstractTagSingle
      def __init__(self, *args, **kw)
      def __setattr__(self, name, value)
      def __str__(self)

## DESCRIPTION

One string argument required. It must be a complete file name, and is usually the original URL of this document. If this file is moved, having the BASE set to the original URL eliminates the need to also move all the documents which are identified by relative URL links in this document.

### 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.

## SEE ALSO

HTMLgen

AbstractTagSingle

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