home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Datafile PD-CD 5
/
DATAFILE_PDCD5.iso
/
utilities
/
p
/
python
/
pyhtmldoc
/
f
/
formatter
< prev
next >
Wrap
Text File
|
1996-11-14
|
2KB
|
36 lines
<TITLE>formatter -- Python library reference</TITLE>
Next: <A HREF="../r/rfc822" TYPE="Next">rfc822</A>
Prev: <A HREF="../h/htmllib" TYPE="Prev">htmllib</A>
Up: <A HREF="../i/internet_and_www" TYPE="Up">Internet and WWW</A>
Top: <A HREF="../t/top" TYPE="Top">Top</A>
<H1>10.10. Standard Module <CODE>formatter</CODE></H1>
This module supports two interface definitions, each with mulitple
implementations. The <I>formatter</I> interface is used by the
<CODE>HTMLParser</CODE> class of the <CODE>htmllib</CODE> module, and the
<I>writer</I> interface is required by the formatter interface.
<P>
Formatter objects transform an abstract flow of formatting events into
specific output events on writer objects. Formatters manage several
stack structures to allow various properties of a writer object to be
changed and restored; writers need not be able to handle relative
changes nor any sort of ``change back'' operation. Specific writer
properties which may be controlled via formatter objects are
horizontal alignment, font, and left margin indentations. A mechanism
is provided which supports providing arbitrary, non-exclusive style
settings to a writer as well. Additional interfaces facilitate
formatting events which are not reversible, such as paragraph
separation.
<P>
Writer objects encapsulate device interfaces. Abstract devices, such
as file formats, are supported as well as physical devices. The
provided implementations all work with abstract devices. The
interface makes available mechanisms for setting the properties which
formatter objects manage and inserting data into the output.
<P>
<H2>Menu</H2><DL COMPACT>
<DT><A HREF="../t/the_formatter_interface" TYPE=Menu>The Formatter Interface</A>
<DD><DT><A HREF="../f/formatter_implementations" TYPE=Menu>Formatter Implementations</A>
<DD><DT><A HREF="../t/the_writer_interface" TYPE=Menu>The Writer Interface</A>
<DD><DT><A HREF="../w/writer_implementations" TYPE=Menu>Writer Implementations</A>
<DD></DL>