home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 5 / DATAFILE_PDCD5.iso / utilities / p / python / pyhtmldoc / w / writer_imp < prev   
Encoding:
Text File  |  1996-11-14  |  1.4 KB  |  27 lines

  1. <TITLE>Writer Implementations -- Python library reference</TITLE>
  2. Prev: <A HREF="../t/the_writer_interface" TYPE="Prev">The Writer Interface</A>  
  3. Up: <A HREF="../f/formatter" TYPE="Up">formatter</A>  
  4. Top: <A HREF="../t/top" TYPE="Top">Top</A>  
  5. <H2>10.10.4. Writer Implementations</H2>
  6. Three implementations of the writer object interface are provided as
  7. examples by this module.  Most applications will need to derive new
  8. writer classes from the <CODE>NullWriter</CODE> class.
  9. <P>
  10. <DL><DT><B>NullWriter</B> () -- function of module formatter<DD>
  11. A writer which only provides the interface definition; no actions are
  12. taken on any methods.  This should be the base class for all writers
  13. which do not need to inherit any implementation methods.
  14. </DL>
  15. <DL><DT><B>AbstractWriter</B> () -- function of module formatter<DD>
  16. A writer which can be used in debugging formatters, but not much
  17. else.  Each method simply accounces itself by printing its name and
  18. arguments on standard output.
  19. </DL>
  20. <DL><DT><B>DumbWriter</B> ([<VAR>file</VAR>@varcode = <VAR>None</VAR>[, <VAR>maxcol</VAR>@varcode = 72]]) -- function of module formatter<DD>
  21. Simple writer class which writes output on the file object passed in
  22. as <CODE>file</CODE> or, if <CODE>file</CODE> is omitted, on standard output.  The
  23. output is simply word-wrapped to the number of columns specified by
  24. <CODE>maxcol</CODE>.  This class is suitable for reflowing a sequence of
  25. paragraphs.
  26. </DL>
  27.