Mercurial > cpython-lru_cache-weakref
annotate Doc/lib/libhtmllib.tex @ 4566:6403c94de50d legacy-trunk
Added safeguard against failure in __del__.
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Wed, 27 Nov 1996 19:39:58 +0000 |
| parents | 77954fe4376c |
| children | 3468ea8645ca |
| rev | line source |
|---|---|
|
2576
f47bc5554418
mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents:
2490
diff
changeset
|
1 \section{Standard Module \sectcode{htmllib}} |
| 2449 | 2 \stmodindex{htmllib} |
|
2453
cdd3a721b40e
a few typographical changes (e.g. -- => ---) and lots of new stuff in the WWW chapter
Guido van Rossum <guido@python.org>
parents:
2449
diff
changeset
|
3 \index{HTML} |
|
cdd3a721b40e
a few typographical changes (e.g. -- => ---) and lots of new stuff in the WWW chapter
Guido van Rossum <guido@python.org>
parents:
2449
diff
changeset
|
4 \index{hypertext} |
|
cdd3a721b40e
a few typographical changes (e.g. -- => ---) and lots of new stuff in the WWW chapter
Guido van Rossum <guido@python.org>
parents:
2449
diff
changeset
|
5 |
|
cdd3a721b40e
a few typographical changes (e.g. -- => ---) and lots of new stuff in the WWW chapter
Guido van Rossum <guido@python.org>
parents:
2449
diff
changeset
|
6 \renewcommand{\indexsubitem}{(in module htmllib)} |
|
cdd3a721b40e
a few typographical changes (e.g. -- => ---) and lots of new stuff in the WWW chapter
Guido van Rossum <guido@python.org>
parents:
2449
diff
changeset
|
7 |
|
4381
798732e69b3b
(libhtmllib.tex): Revised documentation for HTML support.
Fred Drake <fdrake@acm.org>
parents:
2576
diff
changeset
|
8 This module defines a class which can serve as a base for parsing text |
|
798732e69b3b
(libhtmllib.tex): Revised documentation for HTML support.
Fred Drake <fdrake@acm.org>
parents:
2576
diff
changeset
|
9 files formatted in the HyperText Mark-up Language (HTML). The class |
|
798732e69b3b
(libhtmllib.tex): Revised documentation for HTML support.
Fred Drake <fdrake@acm.org>
parents:
2576
diff
changeset
|
10 is not directly concerned with I/O --- it must be provided with input |
|
798732e69b3b
(libhtmllib.tex): Revised documentation for HTML support.
Fred Drake <fdrake@acm.org>
parents:
2576
diff
changeset
|
11 in string form via a method, and makes calls to methods of a |
|
798732e69b3b
(libhtmllib.tex): Revised documentation for HTML support.
Fred Drake <fdrake@acm.org>
parents:
2576
diff
changeset
|
12 ``formatter'' object in order to produce output. The |
|
798732e69b3b
(libhtmllib.tex): Revised documentation for HTML support.
Fred Drake <fdrake@acm.org>
parents:
2576
diff
changeset
|
13 \code{HTMLParser} class is designed to be used as a base class for |
|
798732e69b3b
(libhtmllib.tex): Revised documentation for HTML support.
Fred Drake <fdrake@acm.org>
parents:
2576
diff
changeset
|
14 other classes in order to add functionality, and allows most of its |
|
798732e69b3b
(libhtmllib.tex): Revised documentation for HTML support.
Fred Drake <fdrake@acm.org>
parents:
2576
diff
changeset
|
15 methods to be extended or overridden. In turn, this class is derived |
|
798732e69b3b
(libhtmllib.tex): Revised documentation for HTML support.
Fred Drake <fdrake@acm.org>
parents:
2576
diff
changeset
|
16 from and extends the \code{SGMLParser} class defined in module |
|
798732e69b3b
(libhtmllib.tex): Revised documentation for HTML support.
Fred Drake <fdrake@acm.org>
parents:
2576
diff
changeset
|
17 \code{sgmllib}. Two implementations of formatter objects are |
|
798732e69b3b
(libhtmllib.tex): Revised documentation for HTML support.
Fred Drake <fdrake@acm.org>
parents:
2576
diff
changeset
|
18 provided in the \code{formatter} module; refer to the documentation |
|
798732e69b3b
(libhtmllib.tex): Revised documentation for HTML support.
Fred Drake <fdrake@acm.org>
parents:
2576
diff
changeset
|
19 for that module for information on the formatter interface. |
|
2453
cdd3a721b40e
a few typographical changes (e.g. -- => ---) and lots of new stuff in the WWW chapter
Guido van Rossum <guido@python.org>
parents:
2449
diff
changeset
|
20 \index{SGML} |
|
cdd3a721b40e
a few typographical changes (e.g. -- => ---) and lots of new stuff in the WWW chapter
Guido van Rossum <guido@python.org>
parents:
2449
diff
changeset
|
21 \stmodindex{sgmllib} |
|
cdd3a721b40e
a few typographical changes (e.g. -- => ---) and lots of new stuff in the WWW chapter
Guido van Rossum <guido@python.org>
parents:
2449
diff
changeset
|
22 \ttindex{SGMLParser} |
|
cdd3a721b40e
a few typographical changes (e.g. -- => ---) and lots of new stuff in the WWW chapter
Guido van Rossum <guido@python.org>
parents:
2449
diff
changeset
|
23 \index{formatter} |
|
4381
798732e69b3b
(libhtmllib.tex): Revised documentation for HTML support.
Fred Drake <fdrake@acm.org>
parents:
2576
diff
changeset
|
24 \stmodindex{formatter} |
|
2453
cdd3a721b40e
a few typographical changes (e.g. -- => ---) and lots of new stuff in the WWW chapter
Guido van Rossum <guido@python.org>
parents:
2449
diff
changeset
|
25 |
|
cdd3a721b40e
a few typographical changes (e.g. -- => ---) and lots of new stuff in the WWW chapter
Guido van Rossum <guido@python.org>
parents:
2449
diff
changeset
|
26 The following is a summary of the interface defined by |
|
cdd3a721b40e
a few typographical changes (e.g. -- => ---) and lots of new stuff in the WWW chapter
Guido van Rossum <guido@python.org>
parents:
2449
diff
changeset
|
27 \code{sgmllib.SGMLParser}: |
|
cdd3a721b40e
a few typographical changes (e.g. -- => ---) and lots of new stuff in the WWW chapter
Guido van Rossum <guido@python.org>
parents:
2449
diff
changeset
|
28 |
|
cdd3a721b40e
a few typographical changes (e.g. -- => ---) and lots of new stuff in the WWW chapter
Guido van Rossum <guido@python.org>
parents:
2449
diff
changeset
|
29 \begin{itemize} |
|
cdd3a721b40e
a few typographical changes (e.g. -- => ---) and lots of new stuff in the WWW chapter
Guido van Rossum <guido@python.org>
parents:
2449
diff
changeset
|
30 |
|
cdd3a721b40e
a few typographical changes (e.g. -- => ---) and lots of new stuff in the WWW chapter
Guido van Rossum <guido@python.org>
parents:
2449
diff
changeset
|
31 \item |
|
cdd3a721b40e
a few typographical changes (e.g. -- => ---) and lots of new stuff in the WWW chapter
Guido van Rossum <guido@python.org>
parents:
2449
diff
changeset
|
32 The interface to feed data to an instance is through the \code{feed()} |
|
cdd3a721b40e
a few typographical changes (e.g. -- => ---) and lots of new stuff in the WWW chapter
Guido van Rossum <guido@python.org>
parents:
2449
diff
changeset
|
33 method, which takes a string argument. This can be called with as |
|
4381
798732e69b3b
(libhtmllib.tex): Revised documentation for HTML support.
Fred Drake <fdrake@acm.org>
parents:
2576
diff
changeset
|
34 little or as much text at a time as desired; \code{p.feed(a); |
|
798732e69b3b
(libhtmllib.tex): Revised documentation for HTML support.
Fred Drake <fdrake@acm.org>
parents:
2576
diff
changeset
|
35 p.feed(b)} has the same effect as \code{p.feed(a+b)}. When the data |
|
798732e69b3b
(libhtmllib.tex): Revised documentation for HTML support.
Fred Drake <fdrake@acm.org>
parents:
2576
diff
changeset
|
36 contains complete HTML tags, these are processed immediately; |
|
798732e69b3b
(libhtmllib.tex): Revised documentation for HTML support.
Fred Drake <fdrake@acm.org>
parents:
2576
diff
changeset
|
37 incomplete elements are saved in a buffer. To force processing of all |
|
798732e69b3b
(libhtmllib.tex): Revised documentation for HTML support.
Fred Drake <fdrake@acm.org>
parents:
2576
diff
changeset
|
38 unprocessed data, call the \code{close()} method. |
|
2453
cdd3a721b40e
a few typographical changes (e.g. -- => ---) and lots of new stuff in the WWW chapter
Guido van Rossum <guido@python.org>
parents:
2449
diff
changeset
|
39 |
|
4381
798732e69b3b
(libhtmllib.tex): Revised documentation for HTML support.
Fred Drake <fdrake@acm.org>
parents:
2576
diff
changeset
|
40 For example, to parse the entire contents of a file, use: |
|
798732e69b3b
(libhtmllib.tex): Revised documentation for HTML support.
Fred Drake <fdrake@acm.org>
parents:
2576
diff
changeset
|
41 \begin{verbatim} |
|
798732e69b3b
(libhtmllib.tex): Revised documentation for HTML support.
Fred Drake <fdrake@acm.org>
parents:
2576
diff
changeset
|
42 parser.feed(open('myfile.html').read()) |
|
798732e69b3b
(libhtmllib.tex): Revised documentation for HTML support.
Fred Drake <fdrake@acm.org>
parents:
2576
diff
changeset
|
43 parser.close() |
|
798732e69b3b
(libhtmllib.tex): Revised documentation for HTML support.
Fred Drake <fdrake@acm.org>
parents:
2576
diff
changeset
|
44 \end{verbatim} |
|
2453
cdd3a721b40e
a few typographical changes (e.g. -- => ---) and lots of new stuff in the WWW chapter
Guido van Rossum <guido@python.org>
parents:
2449
diff
changeset
|
45 |
|
cdd3a721b40e
a few typographical changes (e.g. -- => ---) and lots of new stuff in the WWW chapter
Guido van Rossum <guido@python.org>
parents:
2449
diff
changeset
|
46 \item |
|
cdd3a721b40e
a few typographical changes (e.g. -- => ---) and lots of new stuff in the WWW chapter
Guido van Rossum <guido@python.org>
parents:
2449
diff
changeset
|
47 The interface to define semantics for HTML tags is very simple: derive |
|
cdd3a721b40e
a few typographical changes (e.g. -- => ---) and lots of new stuff in the WWW chapter
Guido van Rossum <guido@python.org>
parents:
2449
diff
changeset
|
48 a class and define methods called \code{start_\var{tag}()}, |
|
cdd3a721b40e
a few typographical changes (e.g. -- => ---) and lots of new stuff in the WWW chapter
Guido van Rossum <guido@python.org>
parents:
2449
diff
changeset
|
49 \code{end_\var{tag}()}, or \code{do_\var{tag}()}. The parser will |
|
cdd3a721b40e
a few typographical changes (e.g. -- => ---) and lots of new stuff in the WWW chapter
Guido van Rossum <guido@python.org>
parents:
2449
diff
changeset
|
50 call these at appropriate moments: \code{start_\var{tag}} or |
|
cdd3a721b40e
a few typographical changes (e.g. -- => ---) and lots of new stuff in the WWW chapter
Guido van Rossum <guido@python.org>
parents:
2449
diff
changeset
|
51 \code{do_\var{tag}} is called when an opening tag of the form |
|
cdd3a721b40e
a few typographical changes (e.g. -- => ---) and lots of new stuff in the WWW chapter
Guido van Rossum <guido@python.org>
parents:
2449
diff
changeset
|
52 \code{<\var{tag} ...>} is encountered; \code{end_\var{tag}} is called |
|
cdd3a721b40e
a few typographical changes (e.g. -- => ---) and lots of new stuff in the WWW chapter
Guido van Rossum <guido@python.org>
parents:
2449
diff
changeset
|
53 when a closing tag of the form \code{<\var{tag}>} is encountered. If |
|
cdd3a721b40e
a few typographical changes (e.g. -- => ---) and lots of new stuff in the WWW chapter
Guido van Rossum <guido@python.org>
parents:
2449
diff
changeset
|
54 an opening tag requires a corresponding closing tag, like \code{<H1>} |
|
cdd3a721b40e
a few typographical changes (e.g. -- => ---) and lots of new stuff in the WWW chapter
Guido van Rossum <guido@python.org>
parents:
2449
diff
changeset
|
55 ... \code{</H1>}, the class should define the \code{start_\var{tag}} |
|
cdd3a721b40e
a few typographical changes (e.g. -- => ---) and lots of new stuff in the WWW chapter
Guido van Rossum <guido@python.org>
parents:
2449
diff
changeset
|
56 method; if a tag requires no closing tag, like \code{<P>}, the class |
|
cdd3a721b40e
a few typographical changes (e.g. -- => ---) and lots of new stuff in the WWW chapter
Guido van Rossum <guido@python.org>
parents:
2449
diff
changeset
|
57 should define the \code{do_\var{tag}} method. |
|
cdd3a721b40e
a few typographical changes (e.g. -- => ---) and lots of new stuff in the WWW chapter
Guido van Rossum <guido@python.org>
parents:
2449
diff
changeset
|
58 |
|
cdd3a721b40e
a few typographical changes (e.g. -- => ---) and lots of new stuff in the WWW chapter
Guido van Rossum <guido@python.org>
parents:
2449
diff
changeset
|
59 \end{itemize} |
|
cdd3a721b40e
a few typographical changes (e.g. -- => ---) and lots of new stuff in the WWW chapter
Guido van Rossum <guido@python.org>
parents:
2449
diff
changeset
|
60 |
|
4381
798732e69b3b
(libhtmllib.tex): Revised documentation for HTML support.
Fred Drake <fdrake@acm.org>
parents:
2576
diff
changeset
|
61 The module defines a single class: |
|
2453
cdd3a721b40e
a few typographical changes (e.g. -- => ---) and lots of new stuff in the WWW chapter
Guido van Rossum <guido@python.org>
parents:
2449
diff
changeset
|
62 |
|
4381
798732e69b3b
(libhtmllib.tex): Revised documentation for HTML support.
Fred Drake <fdrake@acm.org>
parents:
2576
diff
changeset
|
63 \begin{funcdesc}{HTMLParser}{formatter} |
|
798732e69b3b
(libhtmllib.tex): Revised documentation for HTML support.
Fred Drake <fdrake@acm.org>
parents:
2576
diff
changeset
|
64 This is the basic HTML parser class. It supports all entity names |
|
798732e69b3b
(libhtmllib.tex): Revised documentation for HTML support.
Fred Drake <fdrake@acm.org>
parents:
2576
diff
changeset
|
65 required by the HTML 2.0 specification (RFC 1866). It also defines |
|
798732e69b3b
(libhtmllib.tex): Revised documentation for HTML support.
Fred Drake <fdrake@acm.org>
parents:
2576
diff
changeset
|
66 handlers for all HTML 2.0 and many HTML 3.0 and 3.2 elements. |
|
2453
cdd3a721b40e
a few typographical changes (e.g. -- => ---) and lots of new stuff in the WWW chapter
Guido van Rossum <guido@python.org>
parents:
2449
diff
changeset
|
67 \end{funcdesc} |
|
cdd3a721b40e
a few typographical changes (e.g. -- => ---) and lots of new stuff in the WWW chapter
Guido van Rossum <guido@python.org>
parents:
2449
diff
changeset
|
68 |
|
4381
798732e69b3b
(libhtmllib.tex): Revised documentation for HTML support.
Fred Drake <fdrake@acm.org>
parents:
2576
diff
changeset
|
69 In addition to tag methods, the \code{HTMLParser} class provides some |
|
798732e69b3b
(libhtmllib.tex): Revised documentation for HTML support.
Fred Drake <fdrake@acm.org>
parents:
2576
diff
changeset
|
70 additional methods and instance variables for use within tag methods. |
|
2453
cdd3a721b40e
a few typographical changes (e.g. -- => ---) and lots of new stuff in the WWW chapter
Guido van Rossum <guido@python.org>
parents:
2449
diff
changeset
|
71 |
|
4390
77954fe4376c
(libhtmllib.tex, libsgmllib.tex, libformatter.tex):
Fred Drake <fdrake@acm.org>
parents:
4381
diff
changeset
|
72 \renewcommand{\indexsubitem}{({\tt HTMLParser} method)} |
|
77954fe4376c
(libhtmllib.tex, libsgmllib.tex, libformatter.tex):
Fred Drake <fdrake@acm.org>
parents:
4381
diff
changeset
|
73 |
|
4381
798732e69b3b
(libhtmllib.tex): Revised documentation for HTML support.
Fred Drake <fdrake@acm.org>
parents:
2576
diff
changeset
|
74 \begin{datadesc}{formatter} |
|
798732e69b3b
(libhtmllib.tex): Revised documentation for HTML support.
Fred Drake <fdrake@acm.org>
parents:
2576
diff
changeset
|
75 This is the formatter instance associated with the parser. |
|
2453
cdd3a721b40e
a few typographical changes (e.g. -- => ---) and lots of new stuff in the WWW chapter
Guido van Rossum <guido@python.org>
parents:
2449
diff
changeset
|
76 \end{datadesc} |
|
cdd3a721b40e
a few typographical changes (e.g. -- => ---) and lots of new stuff in the WWW chapter
Guido van Rossum <guido@python.org>
parents:
2449
diff
changeset
|
77 |
|
4381
798732e69b3b
(libhtmllib.tex): Revised documentation for HTML support.
Fred Drake <fdrake@acm.org>
parents:
2576
diff
changeset
|
78 \begin{datadesc}{nofill} |
|
798732e69b3b
(libhtmllib.tex): Revised documentation for HTML support.
Fred Drake <fdrake@acm.org>
parents:
2576
diff
changeset
|
79 Boolean flag which should be true when whitespace should not be |
|
798732e69b3b
(libhtmllib.tex): Revised documentation for HTML support.
Fred Drake <fdrake@acm.org>
parents:
2576
diff
changeset
|
80 collapsed, or false when it should be. In general, this should only |
|
798732e69b3b
(libhtmllib.tex): Revised documentation for HTML support.
Fred Drake <fdrake@acm.org>
parents:
2576
diff
changeset
|
81 be true when character data is to be treated as ``preformatted'' text, |
|
798732e69b3b
(libhtmllib.tex): Revised documentation for HTML support.
Fred Drake <fdrake@acm.org>
parents:
2576
diff
changeset
|
82 as within a \code{<PRE>} element. The default value is false. This |
|
798732e69b3b
(libhtmllib.tex): Revised documentation for HTML support.
Fred Drake <fdrake@acm.org>
parents:
2576
diff
changeset
|
83 affects the operation of \code{handle_data()} and \code{save_end()}. |
|
2453
cdd3a721b40e
a few typographical changes (e.g. -- => ---) and lots of new stuff in the WWW chapter
Guido van Rossum <guido@python.org>
parents:
2449
diff
changeset
|
84 \end{datadesc} |
|
cdd3a721b40e
a few typographical changes (e.g. -- => ---) and lots of new stuff in the WWW chapter
Guido van Rossum <guido@python.org>
parents:
2449
diff
changeset
|
85 |
|
4381
798732e69b3b
(libhtmllib.tex): Revised documentation for HTML support.
Fred Drake <fdrake@acm.org>
parents:
2576
diff
changeset
|
86 \begin{funcdesc}{anchor_bgn}{href\, name\, type} |
|
798732e69b3b
(libhtmllib.tex): Revised documentation for HTML support.
Fred Drake <fdrake@acm.org>
parents:
2576
diff
changeset
|
87 This method is called at the start of an anchor region. The arguments |
|
798732e69b3b
(libhtmllib.tex): Revised documentation for HTML support.
Fred Drake <fdrake@acm.org>
parents:
2576
diff
changeset
|
88 correspond to the attributes of the \code{<A>} tag with the same |
|
798732e69b3b
(libhtmllib.tex): Revised documentation for HTML support.
Fred Drake <fdrake@acm.org>
parents:
2576
diff
changeset
|
89 names. The default implementation maintains a list of hyperlinks |
|
798732e69b3b
(libhtmllib.tex): Revised documentation for HTML support.
Fred Drake <fdrake@acm.org>
parents:
2576
diff
changeset
|
90 (defined by the \code{href} argument) within the document. The list |
|
798732e69b3b
(libhtmllib.tex): Revised documentation for HTML support.
Fred Drake <fdrake@acm.org>
parents:
2576
diff
changeset
|
91 of hyperlinks is available as the data attribute \code{anchorlist}. |
|
798732e69b3b
(libhtmllib.tex): Revised documentation for HTML support.
Fred Drake <fdrake@acm.org>
parents:
2576
diff
changeset
|
92 \end{funcdesc} |
|
2453
cdd3a721b40e
a few typographical changes (e.g. -- => ---) and lots of new stuff in the WWW chapter
Guido van Rossum <guido@python.org>
parents:
2449
diff
changeset
|
93 |
|
4381
798732e69b3b
(libhtmllib.tex): Revised documentation for HTML support.
Fred Drake <fdrake@acm.org>
parents:
2576
diff
changeset
|
94 \begin{funcdesc}{anchor_end}{} |
|
798732e69b3b
(libhtmllib.tex): Revised documentation for HTML support.
Fred Drake <fdrake@acm.org>
parents:
2576
diff
changeset
|
95 This method is called at the end of an anchor region. The default |
|
798732e69b3b
(libhtmllib.tex): Revised documentation for HTML support.
Fred Drake <fdrake@acm.org>
parents:
2576
diff
changeset
|
96 implementation adds a textual footnote marker using an index into the |
|
798732e69b3b
(libhtmllib.tex): Revised documentation for HTML support.
Fred Drake <fdrake@acm.org>
parents:
2576
diff
changeset
|
97 list of hyperlinks created by \code{anchor_bgn()}. |
|
2453
cdd3a721b40e
a few typographical changes (e.g. -- => ---) and lots of new stuff in the WWW chapter
Guido van Rossum <guido@python.org>
parents:
2449
diff
changeset
|
98 \end{funcdesc} |
|
cdd3a721b40e
a few typographical changes (e.g. -- => ---) and lots of new stuff in the WWW chapter
Guido van Rossum <guido@python.org>
parents:
2449
diff
changeset
|
99 |
|
4381
798732e69b3b
(libhtmllib.tex): Revised documentation for HTML support.
Fred Drake <fdrake@acm.org>
parents:
2576
diff
changeset
|
100 \begin{funcdesc}{handle_image}{source\, alt\optional{\, ismap\optional{\, align\optional{\, width\optional{\, height}}}}} |
|
798732e69b3b
(libhtmllib.tex): Revised documentation for HTML support.
Fred Drake <fdrake@acm.org>
parents:
2576
diff
changeset
|
101 This method is called to handle images. The default implementation |
|
798732e69b3b
(libhtmllib.tex): Revised documentation for HTML support.
Fred Drake <fdrake@acm.org>
parents:
2576
diff
changeset
|
102 simply passes the \code{alt} value to the \code{handle_data()} |
|
798732e69b3b
(libhtmllib.tex): Revised documentation for HTML support.
Fred Drake <fdrake@acm.org>
parents:
2576
diff
changeset
|
103 method. |
|
2453
cdd3a721b40e
a few typographical changes (e.g. -- => ---) and lots of new stuff in the WWW chapter
Guido van Rossum <guido@python.org>
parents:
2449
diff
changeset
|
104 \end{funcdesc} |
|
cdd3a721b40e
a few typographical changes (e.g. -- => ---) and lots of new stuff in the WWW chapter
Guido van Rossum <guido@python.org>
parents:
2449
diff
changeset
|
105 |
|
4381
798732e69b3b
(libhtmllib.tex): Revised documentation for HTML support.
Fred Drake <fdrake@acm.org>
parents:
2576
diff
changeset
|
106 \begin{funcdesc}{save_bgn}{} |
|
798732e69b3b
(libhtmllib.tex): Revised documentation for HTML support.
Fred Drake <fdrake@acm.org>
parents:
2576
diff
changeset
|
107 Begins saving character data in a buffer instead of sending it to the |
|
798732e69b3b
(libhtmllib.tex): Revised documentation for HTML support.
Fred Drake <fdrake@acm.org>
parents:
2576
diff
changeset
|
108 formatter object. Retrieve the stored data via \code{save_end()} |
|
798732e69b3b
(libhtmllib.tex): Revised documentation for HTML support.
Fred Drake <fdrake@acm.org>
parents:
2576
diff
changeset
|
109 Use of the \code{save_bgn()} / \code{save_end()} pair may not be |
|
798732e69b3b
(libhtmllib.tex): Revised documentation for HTML support.
Fred Drake <fdrake@acm.org>
parents:
2576
diff
changeset
|
110 nested. |
|
2453
cdd3a721b40e
a few typographical changes (e.g. -- => ---) and lots of new stuff in the WWW chapter
Guido van Rossum <guido@python.org>
parents:
2449
diff
changeset
|
111 \end{funcdesc} |
|
cdd3a721b40e
a few typographical changes (e.g. -- => ---) and lots of new stuff in the WWW chapter
Guido van Rossum <guido@python.org>
parents:
2449
diff
changeset
|
112 |
|
4381
798732e69b3b
(libhtmllib.tex): Revised documentation for HTML support.
Fred Drake <fdrake@acm.org>
parents:
2576
diff
changeset
|
113 \begin{funcdesc}{save_end}{} |
|
798732e69b3b
(libhtmllib.tex): Revised documentation for HTML support.
Fred Drake <fdrake@acm.org>
parents:
2576
diff
changeset
|
114 Ends buffering character data and returns all data saved since the |
|
798732e69b3b
(libhtmllib.tex): Revised documentation for HTML support.
Fred Drake <fdrake@acm.org>
parents:
2576
diff
changeset
|
115 preceeding call to \code{save_bgn()}. If \code{nofill} flag is false, |
|
798732e69b3b
(libhtmllib.tex): Revised documentation for HTML support.
Fred Drake <fdrake@acm.org>
parents:
2576
diff
changeset
|
116 whitespace is collapsed to single spaces. A call to this method |
|
798732e69b3b
(libhtmllib.tex): Revised documentation for HTML support.
Fred Drake <fdrake@acm.org>
parents:
2576
diff
changeset
|
117 without a preceeding call to \code{save_bgn()} will raise a |
|
798732e69b3b
(libhtmllib.tex): Revised documentation for HTML support.
Fred Drake <fdrake@acm.org>
parents:
2576
diff
changeset
|
118 \code{TypeError} exception. |
|
2453
cdd3a721b40e
a few typographical changes (e.g. -- => ---) and lots of new stuff in the WWW chapter
Guido van Rossum <guido@python.org>
parents:
2449
diff
changeset
|
119 \end{funcdesc} |
