home *** CD-ROM | disk | FTP | other *** search
- <TITLE>Writer Implementations -- Python library reference</TITLE>
- Prev: <A HREF="../t/the_writer_interface" TYPE="Prev">The Writer Interface</A>
- Up: <A HREF="../f/formatter" TYPE="Up">formatter</A>
- Top: <A HREF="../t/top" TYPE="Top">Top</A>
- <H2>10.10.4. Writer Implementations</H2>
- Three implementations of the writer object interface are provided as
- examples by this module. Most applications will need to derive new
- writer classes from the <CODE>NullWriter</CODE> class.
- <P>
- <DL><DT><B>NullWriter</B> () -- function of module formatter<DD>
- A writer which only provides the interface definition; no actions are
- taken on any methods. This should be the base class for all writers
- which do not need to inherit any implementation methods.
- </DL>
- <DL><DT><B>AbstractWriter</B> () -- function of module formatter<DD>
- A writer which can be used in debugging formatters, but not much
- else. Each method simply accounces itself by printing its name and
- arguments on standard output.
- </DL>
- <DL><DT><B>DumbWriter</B> ([<VAR>file</VAR>@varcode = <VAR>None</VAR>[, <VAR>maxcol</VAR>@varcode = 72]]) -- function of module formatter<DD>
- Simple writer class which writes output on the file object passed in
- as <CODE>file</CODE> or, if <CODE>file</CODE> is omitted, on standard output. The
- output is simply word-wrapped to the number of columns specified by
- <CODE>maxcol</CODE>. This class is suitable for reflowing a sequence of
- paragraphs.
- </DL>
-