home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 5 / DATAFILE_PDCD5.iso / utilities / p / python / pyhtmldoc / f / formatter < prev    next >
Text File  |  1996-11-14  |  2KB  |  36 lines

  1. <TITLE>formatter -- Python library reference</TITLE>
  2. Next: <A HREF="../r/rfc822" TYPE="Next">rfc822</A>  
  3. Prev: <A HREF="../h/htmllib" TYPE="Prev">htmllib</A>  
  4. Up: <A HREF="../i/internet_and_www" TYPE="Up">Internet and WWW</A>  
  5. Top: <A HREF="../t/top" TYPE="Top">Top</A>  
  6. <H1>10.10. Standard Module <CODE>formatter</CODE></H1>
  7. This module supports two interface definitions, each with mulitple
  8. implementations.  The <I>formatter</I> interface is used by the
  9. <CODE>HTMLParser</CODE> class of the <CODE>htmllib</CODE> module, and the
  10. <I>writer</I> interface is required by the formatter interface.
  11. <P>
  12. Formatter objects transform an abstract flow of formatting events into
  13. specific output events on writer objects.  Formatters manage several
  14. stack structures to allow various properties of a writer object to be
  15. changed and restored; writers need not be able to handle relative
  16. changes nor any sort of ``change back'' operation.  Specific writer
  17. properties which may be controlled via formatter objects are
  18. horizontal alignment, font, and left margin indentations.  A mechanism
  19. is provided which supports providing arbitrary, non-exclusive style
  20. settings to a writer as well.  Additional interfaces facilitate
  21. formatting events which are not reversible, such as paragraph
  22. separation.
  23. <P>
  24. Writer objects encapsulate device interfaces.  Abstract devices, such
  25. as file formats, are supported as well as physical devices.  The
  26. provided implementations all work with abstract devices.  The
  27. interface makes available mechanisms for setting the properties which
  28. formatter objects manage and inserting data into the output.
  29. <P>
  30. <H2>Menu</H2><DL COMPACT>
  31. <DT><A HREF="../t/the_formatter_interface" TYPE=Menu>The Formatter Interface</A>
  32. <DD><DT><A HREF="../f/formatter_implementations" TYPE=Menu>Formatter Implementations</A>
  33. <DD><DT><A HREF="../t/the_writer_interface" TYPE=Menu>The Writer Interface</A>
  34. <DD><DT><A HREF="../w/writer_implementations" TYPE=Menu>Writer Implementations</A>
  35. <DD></DL>
  36.