~pythonregexp2.7/python/issue2636-20

« back to all changes in this revision

Viewing changes to Doc/library/email.generator.rst

  • Committer: benjamin.peterson
  • Date: 2008-04-25 01:29:10 UTC
  • Revision ID: svn-v3-trunk1:6015fed2-1504-0410-9fe1-9d1591cc4771:python%2Ftrunk:62490
reformat some documentation of classes so methods and attributes are under the class directive

Show diffs side-by-side

added added

removed removed

Lines of Context:
44
44
   :mod:`email.header.Header` class.  Set to zero to disable header wrapping.  The
45
45
   default is 78, as recommended (but not required) by :rfc:`2822`.
46
46
 
47
 
The other public :class:`Generator` methods are:
48
 
 
49
 
 
50
 
.. method:: Generator.flatten(msg[, unixfrom])
51
 
 
52
 
   Print the textual representation of the message object structure rooted at *msg*
53
 
   to the output file specified when the :class:`Generator` instance was created.
54
 
   Subparts are visited depth-first and the resulting text will be properly MIME
55
 
   encoded.
56
 
 
57
 
   Optional *unixfrom* is a flag that forces the printing of the envelope header
58
 
   delimiter before the first :rfc:`2822` header of the root message object.  If
59
 
   the root object has no envelope header, a standard one is crafted.  By default,
60
 
   this is set to ``False`` to inhibit the printing of the envelope delimiter.
61
 
 
62
 
   Note that for subparts, no envelope header is ever printed.
63
 
 
64
 
   .. versionadded:: 2.2.2
65
 
 
66
 
 
67
 
.. method:: Generator.clone(fp)
68
 
 
69
 
   Return an independent clone of this :class:`Generator` instance with the exact
70
 
   same options.
71
 
 
72
 
   .. versionadded:: 2.2.2
73
 
 
74
 
 
75
 
.. method:: Generator.write(s)
76
 
 
77
 
   Write the string *s* to the underlying file object, i.e. *outfp* passed to
78
 
   :class:`Generator`'s constructor.  This provides just enough file-like API for
79
 
   :class:`Generator` instances to be used in extended print statements.
 
47
   The other public :class:`Generator` methods are:
 
48
 
 
49
 
 
50
   .. method:: flatten(msg[, unixfrom])
 
51
 
 
52
      Print the textual representation of the message object structure rooted at
 
53
      *msg* to the output file specified when the :class:`Generator` instance
 
54
      was created.  Subparts are visited depth-first and the resulting text will
 
55
      be properly MIME encoded.
 
56
 
 
57
      Optional *unixfrom* is a flag that forces the printing of the envelope
 
58
      header delimiter before the first :rfc:`2822` header of the root message
 
59
      object.  If the root object has no envelope header, a standard one is
 
60
      crafted.  By default, this is set to ``False`` to inhibit the printing of
 
61
      the envelope delimiter.
 
62
 
 
63
      Note that for subparts, no envelope header is ever printed.
 
64
 
 
65
      .. versionadded:: 2.2.2
 
66
 
 
67
 
 
68
   .. method:: clone(fp)
 
69
 
 
70
      Return an independent clone of this :class:`Generator` instance with the
 
71
      exact same options.
 
72
 
 
73
      .. versionadded:: 2.2.2
 
74
 
 
75
 
 
76
   .. method:: write(s)
 
77
 
 
78
      Write the string *s* to the underlying file object, i.e. *outfp* passed to
 
79
      :class:`Generator`'s constructor.  This provides just enough file-like API
 
80
      for :class:`Generator` instances to be used in extended print statements.
80
81
 
81
82
As a convenience, see the methods :meth:`Message.as_string` and
82
83
``str(aMessage)``, a.k.a. :meth:`Message.__str__`, which simplify the generation